|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ICrossSessionCache
This interface define the control over objects alive across different sessions. It is a wrapper for all objects put into cross cache. It's primary purpose is to maintain references to the linked objects that has been used. Different strategies can be used on the implementations to support the idea of a cache based on weak reference.
Method Summary | |
---|---|
void |
addObject(java.lang.Object object,
OID oid)
Associates the specified OID with the specified object(key) in
this cache |
void |
clear()
Removes all mappings from this cache. |
boolean |
existObject(java.lang.Object object)
Returns true if this cache maps one key to the specified object. |
OID |
getOid(java.lang.Object object)
Return the specific OID |
boolean |
isEmpty()
Returns true if this map contains no key-value mappings. |
void |
removeObject(java.lang.Object object)
Removes the mapping for this object from this cache if it is present. |
void |
removeOid(OID oid)
Mark the object with the oid as deleted. |
int |
size()
Returns the number of key-value mappings in this cache. |
java.lang.String |
toString()
Returns a String writing down the objects |
Method Detail |
---|
void addObject(java.lang.Object object, OID oid)
OID
with the specified object(key) in
this cache
object
- The key. This parameter can not be null
{@link
- OID} The value. It is transformed to use weak reference for
the keys.void removeObject(java.lang.Object object)
object
- that contains the reference to OID
. This parameter can not be null
void removeOid(OID oid)
oid
- that must be marked as deleted.
When objects are deleted by oid, the cost is too high to search the object by the oid, so we just keep the deleted oid, and when looking for an object, check if the oid if is the deleted oids
boolean existObject(java.lang.Object object)
object
-
OID getOid(java.lang.Object object)
OID
object
- The key on the cache for a OID
. This parameter can not be null
OID
. Returns null
in case no find key.boolean isEmpty()
void clear()
java.lang.String toString()
toString
in class java.lang.Object
int size()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |