|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Level2Cache
Interface for any Level 2 Cache used internally. Provides the typical controls required internally and including the JDO2/JPA1 L2 cache methods.
| Nested Class Summary | |
|---|---|
static class |
Level2Cache.PinnedClass
Representation of a class whose objects will be pinned when put into the L2 cache. |
| Method Summary | |
|---|---|
void |
clear()
Method to clear the cache. |
void |
close()
Method to close the cache when no longer needed. |
boolean |
containsOid(java.lang.Object oid)
Accessor for whether an object with the specified id is in the cache |
void |
evict(java.lang.Object oid)
Evict the parameter instance from the second-level cache. |
void |
evictAll()
Evict the parameter instances from the second-level cache. |
void |
evictAll(java.lang.Class pcClass,
boolean subclasses)
Evict the parameter instances from the second-level cache. |
void |
evictAll(java.util.Collection oids)
Evict the parameter instances from the second-level cache. |
void |
evictAll(java.lang.Object[] oids)
Evict the parameter instances from the second-level cache. |
CachedPC |
get(java.lang.Object oid)
Accessor for an object from the cache. |
int |
getNumberOfPinnedObjects()
Accessor for the number of pinned objects in the cache. |
int |
getNumberOfUnpinnedObjects()
Accessor for the number of unpinned objects in the cache. |
int |
getSize()
Accessor for the total number of objects in the L2 cache. |
boolean |
isEmpty()
Accessor for whether the cache is empty. |
void |
pin(java.lang.Object oid)
Pin the parameter instance in the second-level cache. |
void |
pinAll(java.lang.Class pcClass,
boolean subclasses)
Pin instances in the second-level cache. |
void |
pinAll(java.util.Collection oids)
Pin the parameter instances in the second-level cache. |
void |
pinAll(java.lang.Object[] oids)
Pin the parameter instances in the second-level cache. |
CachedPC |
put(java.lang.Object oid,
CachedPC pc)
Method to put an object in the cache. |
void |
unpin(java.lang.Object oid)
Unpin the parameter instance from the second-level cache. |
void |
unpinAll(java.lang.Class pcClass,
boolean subclasses)
Unpin instances from the second-level cache. |
void |
unpinAll(java.util.Collection oids)
Unpin the parameter instances from the second-level cache. |
void |
unpinAll(java.lang.Object[] oids)
Unpin the parameter instance from the second-level cache. |
| Method Detail |
|---|
void close()
void evict(java.lang.Object oid)
oid - the object id of the instance to evict.void evictAll()
void evictAll(java.lang.Object[] oids)
oids - the object ids of the instance to evict.void evictAll(java.util.Collection oids)
oids - the object ids of the instance to evict.
void evictAll(java.lang.Class pcClass,
boolean subclasses)
pcClass - the class of instances to evictsubclasses - if true, evict instances of subclasses alsovoid pin(java.lang.Object oid)
oid - the object id of the instance to pin.void pinAll(java.util.Collection oids)
oids - the object ids of the instances to pin.void pinAll(java.lang.Object[] oids)
oids - the object ids of the instances to pin.
void pinAll(java.lang.Class pcClass,
boolean subclasses)
pcClass - the class of instances to pinsubclasses - if true, pin instances of subclasses alsovoid unpin(java.lang.Object oid)
oid - the object id of the instance to unpin.void unpinAll(java.util.Collection oids)
oids - the object ids of the instance to evict.void unpinAll(java.lang.Object[] oids)
oids - the object id of the instance to evict.
void unpinAll(java.lang.Class pcClass,
boolean subclasses)
pcClass - the class of instances to unpinsubclasses - if true, unpin instances of subclasses alsoint getNumberOfPinnedObjects()
int getNumberOfUnpinnedObjects()
int getSize()
CachedPC get(java.lang.Object oid)
oid - The Object ID
CachedPC put(java.lang.Object oid,
CachedPC pc)
oid - The Object id for this objectpc - The L2 cacheable PersistenceCapable object
boolean isEmpty()
void clear()
boolean containsOid(java.lang.Object oid)
oid - The object id
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||