public class JavaxCacheLevel2Cache extends AbstractLevel2Cache
Level2Cache.PinnedClass
cacheName, clearAtClose, maxSize, nucleusCtx, timeout
Constructor and Description |
---|
JavaxCacheLevel2Cache(NucleusContext nucleusCtx)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
getNumberOfPinnedObjects, getNumberOfUnpinnedObjects, pin, pinAll, pinAll, pinAll, unpin, unpinAll, unpinAll, unpinAll
public JavaxCacheLevel2Cache(NucleusContext nucleusCtx)
nucleusCtx
- Contextpublic void close()
public boolean containsOid(Object oid)
oid
- The object idLevel2Cache.containsOid(java.lang.Object)
public CachedPC get(Object oid)
oid
- The Object IDLevel2Cache.get(java.lang.Object)
public Map<Object,CachedPC> getAll(Collection oids)
Level2Cache
getAll
in interface Level2Cache
getAll
in class AbstractLevel2Cache
oids
- The Object IDspublic 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 objectpublic 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 alsoCopyright © 2017. All rights reserved.