|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.ejb.CacheKey
CacheKey is an encapsulation of both the PrimaryKey and a cache specific key.
This implementation is a safe implementation in the sense that it doesn't rely on the user supplied hashcode and equals. It is also fast since the hashCode operation is pre-calculated.
org.jboss.ejb.plugins.NoPassivationInstanceCache.java
,
EntityInstanceCache
(src) ,
org.jboss.ejb.plugins.EntityProxy
,
Serialized FormField Summary | |
protected int |
hashCode
The Marshalled Object's hashcode |
protected java.lang.Object |
id
The database primaryKey. |
protected java.rmi.MarshalledObject |
mo
The Marshalled Object representing the key |
Constructor Summary | |
CacheKey()
|
|
CacheKey(java.lang.Object id)
|
Method Summary | |
boolean |
equals(java.lang.Object object)
This method uses the id implementation of equals if the mo is null since this indicates that the id class did implement equals. |
java.lang.Object |
getId()
|
int |
hashCode()
these should be overwritten by extending Cache key since they define what the cache does in the first place |
void |
readExternal(java.io.ObjectInput in)
|
java.lang.String |
toString()
|
void |
writeExternal(java.io.ObjectOutput out)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.lang.Object id
protected java.rmi.MarshalledObject mo
protected int hashCode
Constructor Detail |
public CacheKey()
public CacheKey(java.lang.Object id)
Method Detail |
public java.lang.Object getId()
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public int hashCode()
public boolean equals(java.lang.Object object)
public java.lang.String toString()
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |