public abstract class AbstractLevel2Cache extends Object implements Level2Cache
Level2Cache.PinnedClass| Modifier and Type | Field and Description |
|---|---|
protected String |
cacheName
Name of the cache to use.
|
protected boolean |
clearAtClose
Whether to clear out all objects at close().
|
protected int |
maxSize
Maximum size of cache (if supported by the plugin).
|
protected NucleusContext |
nucleusCtx |
protected long |
timeout
Timeout for cache object expiration (milliseconds).
|
| Constructor and Description |
|---|
AbstractLevel2Cache(NucleusContext nucleusCtx) |
| Modifier and Type | Method and Description |
|---|---|
Map<Object,CachedPC> |
getAll(Collection oids)
Accessor for a collection of objects 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.
|
boolean |
isEmpty()
Accessor for whether the cache is empty
|
void |
pin(Object arg0)
Pin the parameter instance in the second-level cache.
|
void |
pinAll(Class arg0,
boolean arg1)
Pin instances in the second-level cache.
|
void |
pinAll(Collection arg0)
Pin the parameter instances in the second-level cache.
|
void |
pinAll(Object[] arg0)
Pin the parameter instances in the second-level cache.
|
void |
putAll(Map<Object,CachedPC> objs)
Method to put several objects into the cache.
|
void |
unpin(Object arg0)
Unpin the parameter instance from the second-level cache.
|
void |
unpinAll(Class arg0,
boolean arg1)
Unpin instances from the second-level cache.
|
void |
unpinAll(Collection arg0)
Unpin the parameter instances from the second-level cache.
|
void |
unpinAll(Object[] arg0)
Unpin the parameter instance from the second-level cache.
|
protected NucleusContext nucleusCtx
protected int maxSize
protected boolean clearAtClose
protected long timeout
protected String cacheName
public AbstractLevel2Cache(NucleusContext nucleusCtx)
public Map<Object,CachedPC> getAll(Collection oids)
Level2CachegetAll in interface Level2Cacheoids - The Object IDspublic void putAll(Map<Object,CachedPC> objs)
Level2CacheputAll in interface Level2Cacheobjs - Map of cacheable object keyed by its oid.public boolean isEmpty()
isEmpty in interface Level2CacheLevel2Cache.isEmpty()public int getNumberOfPinnedObjects()
Level2CachegetNumberOfPinnedObjects in interface Level2Cachepublic int getNumberOfUnpinnedObjects()
Level2CachegetNumberOfUnpinnedObjects in interface Level2Cachepublic void pin(Object arg0)
Level2Cachepin in interface Level2Cachearg0 - the object id of the instance to pin.public void pinAll(Collection arg0)
Level2CachepinAll in interface Level2Cachearg0 - the object ids of the instances to pin.public void pinAll(Object[] arg0)
Level2CachepinAll in interface Level2Cachearg0 - the object ids of the instances to pin.public void pinAll(Class arg0, boolean arg1)
Level2CachepinAll in interface Level2Cachearg0 - the class of instances to pinarg1 - if true, pin instances of subclasses alsopublic void unpin(Object arg0)
Level2Cacheunpin in interface Level2Cachearg0 - the object id of the instance to unpin.public void unpinAll(Collection arg0)
Level2CacheunpinAll in interface Level2Cachearg0 - the object ids of the instance to evict.public void unpinAll(Object[] arg0)
Level2CacheunpinAll in interface Level2Cachearg0 - the object id of the instance to evict.public void unpinAll(Class arg0, boolean arg1)
Level2CacheunpinAll in interface Level2Cachearg0 - the class of instances to unpinarg1 - if true, unpin instances of subclasses alsoCopyright © 2017. All rights reserved.