|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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
,
org.jboss.ejb.plugins.EntityProxy
,
Serialized FormField Summary | |
protected int |
hashCode
The Marshalled Object's hashcode |
protected Object |
id
The database primaryKey. |
protected MarshalledObject |
mo
The Marshalled Object representing the key |
Constructor Summary | |
CacheKey()
|
|
CacheKey(Object id)
|
Method Summary | |
boolean |
equals(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. |
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(ObjectInput in)
|
String |
toString()
|
void |
writeExternal(ObjectOutput out)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Object id
protected MarshalledObject mo
protected int hashCode
Constructor Detail |
public CacheKey()
public CacheKey(Object id)
Method Detail |
public Object getId()
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public int hashCode()
public boolean equals(Object object)
public String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |