Package org.datanucleus.cache
Class AbstractLevel2Cache
- java.lang.Object
-
- org.datanucleus.cache.AbstractLevel2Cache
-
- All Implemented Interfaces:
Serializable
,Level2Cache
- Direct Known Subclasses:
JavaxCacheLevel2Cache
,NullLevel2Cache
public abstract class AbstractLevel2Cache extends Object implements Level2Cache
Abstract starting point for a third-party L2 cache plugin. Override the pin/unpin methods if supportable by your plugin.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
cacheName
Name of the cache to use.protected boolean
clearAtClose
Whether to clear out all objects at close().protected long
expiryMillis
Timeout for cache object expiration (milliseconds).protected int
maxSize
Maximum size of cache (if supported by the plugin).protected NucleusContext
nucleusCtx
-
Constructor Summary
Constructors Constructor Description AbstractLevel2Cache(NucleusContext nucleusCtx)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.datanucleus.cache.Level2Cache
close, containsOid, evict, evictAll, evictAll, evictAll, evictAll, get, getAll, getNumberOfPinnedObjects, getNumberOfUnpinnedObjects, getSize, getUnique, isEmpty, pin, pinAll, pinAll, pinAll, put, putAll, putUnique, putUniqueAll, removeUnique, unpin, unpinAll, unpinAll, unpinAll
-
-
-
-
Field Detail
-
nucleusCtx
protected NucleusContext nucleusCtx
-
maxSize
protected int maxSize
Maximum size of cache (if supported by the plugin).
-
clearAtClose
protected boolean clearAtClose
Whether to clear out all objects at close().
-
expiryMillis
protected long expiryMillis
Timeout for cache object expiration (milliseconds).
-
cacheName
protected String cacheName
Name of the cache to use.
-
-
Constructor Detail
-
AbstractLevel2Cache
public AbstractLevel2Cache(NucleusContext nucleusCtx)
-
-