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)
Level2Cache
getAll
in interface Level2Cache
oids
- The Object IDspublic void putAll(Map<Object,CachedPC> objs)
Level2Cache
putAll
in interface Level2Cache
objs
- Map of cacheable object keyed by its oid.public boolean isEmpty()
isEmpty
in interface Level2Cache
Level2Cache.isEmpty()
public int getNumberOfPinnedObjects()
Level2Cache
getNumberOfPinnedObjects
in interface Level2Cache
public int getNumberOfUnpinnedObjects()
Level2Cache
getNumberOfUnpinnedObjects
in interface Level2Cache
public void pin(Object arg0)
Level2Cache
pin
in interface Level2Cache
arg0
- the object id of the instance to pin.public void pinAll(Collection arg0)
Level2Cache
pinAll
in interface Level2Cache
arg0
- the object ids of the instances to pin.public void pinAll(Object[] arg0)
Level2Cache
pinAll
in interface Level2Cache
arg0
- the object ids of the instances to pin.public void pinAll(Class arg0, boolean arg1)
Level2Cache
pinAll
in interface Level2Cache
arg0
- the class of instances to pinarg1
- if true, pin instances of subclasses alsopublic void unpin(Object arg0)
Level2Cache
unpin
in interface Level2Cache
arg0
- the object id of the instance to unpin.public void unpinAll(Collection arg0)
Level2Cache
unpinAll
in interface Level2Cache
arg0
- the object ids of the instance to evict.public void unpinAll(Object[] arg0)
Level2Cache
unpinAll
in interface Level2Cache
arg0
- the object id of the instance to evict.public void unpinAll(Class arg0, boolean arg1)
Level2Cache
unpinAll
in interface Level2Cache
arg0
- the class of instances to unpinarg1
- if true, unpin instances of subclasses alsoCopyright © 2018. All rights reserved.