|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.datanucleus.cache.AbstractLevel2Cache
org.datanucleus.cache.JavaxCacheLevel2Cache
public class JavaxCacheLevel2Cache
Simple implementation of a plugin for use of javax.cache (v0.61+) product with DataNucleus.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.datanucleus.cache.Level2Cache |
---|
Level2Cache.PinnedClass |
Field Summary |
---|
Fields inherited from class org.datanucleus.cache.AbstractLevel2Cache |
---|
cacheName, clearAtClose, LOCALISER, maxSize, nucleusCtx, timeout |
Constructor Summary | |
---|---|
JavaxCacheLevel2Cache(NucleusContext nucleusCtx)
Constructor. |
Method Summary | |
---|---|
void |
close()
Method to close the cache when no longer needed. |
boolean |
containsOid(Object oid)
Accessor for whether the cache contains the specified id. |
void |
evict(Object oid)
Evict the parameter instance from the second-level cache. |
void |
evictAll()
Evict the parameter instances from the second-level cache. |
void |
evictAll(Class pcClass,
boolean subclasses)
Evict the parameter instances from the second-level cache. |
void |
evictAll(Collection oids)
Evict the parameter instances from the second-level cache. |
void |
evictAll(Object[] oids)
Evict the parameter instances from the second-level cache. |
CachedPC |
get(Object oid)
Accessor for an object in the cache. |
Map<Object,CachedPC> |
getAll(Collection oids)
Accessor for a collection of objects from the cache. |
int |
getSize()
Accessor for the size of the cache. |
boolean |
isEmpty()
Accessor for whether the cache is empty |
CachedPC |
put(Object oid,
CachedPC pc)
Method to add an object to the cache under its id |
void |
putAll(Map<Object,CachedPC> objs)
Method to put several objects into the cache. |
Methods inherited from class org.datanucleus.cache.AbstractLevel2Cache |
---|
getNumberOfPinnedObjects, getNumberOfUnpinnedObjects, pin, pinAll, pinAll, pinAll, unpin, unpinAll, unpinAll, unpinAll |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JavaxCacheLevel2Cache(NucleusContext nucleusCtx)
nucleusCtx
- ContextMethod Detail |
---|
public void close()
public boolean containsOid(Object oid)
oid
- The object id
Level2Cache.containsOid(java.lang.Object)
public CachedPC get(Object oid)
oid
- The Object ID
Level2Cache.get(java.lang.Object)
public Map<Object,CachedPC> getAll(Collection oids)
Level2Cache
getAll
in interface Level2Cache
getAll
in class AbstractLevel2Cache
oids
- The Object IDs
public int getSize()
Level2Cache.getSize()
public boolean isEmpty()
isEmpty
in interface Level2Cache
isEmpty
in class AbstractLevel2Cache
Level2Cache.isEmpty()
public CachedPC put(Object oid, CachedPC pc)
oid
- The identitypc
- The cacheable object
public void putAll(Map<Object,CachedPC> objs)
Level2Cache
putAll
in interface Level2Cache
putAll
in class AbstractLevel2Cache
objs
- Map of cacheable object keyed by its oid.public void evict(Object oid)
oid
- the object id of the instance to evict.public void evictAll()
public void evictAll(Collection oids)
oids
- the object ids of the instance to evict.public void evictAll(Object[] oids)
oids
- the object ids of the instance to evict.public void evictAll(Class pcClass, boolean subclasses)
pcClass
- the class of instances to evictsubclasses
- if true, evict instances of subclasses also
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |