|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.cache.oscache.OSCacheLevel2Cache
public class OSCacheLevel2Cache
Simple implementation of a plugin for use of OSCache caching product with DataNucleus. Please refer to OpenSymphony OSCache for full details of their product.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.datanucleus.cache.Level2Cache |
|---|
org.datanucleus.cache.Level2Cache.PinnedClass |
| Constructor Summary | |
|---|---|
OSCacheLevel2Cache(org.datanucleus.OMFContext omfCtx)
Constructor. |
|
| Method Summary | |
|---|---|
void |
clear()
Method to clear the cache |
void |
close()
Method to close the cache when no longer needed. |
boolean |
containsOid(java.lang.Object oid)
Accessor for whether the cache contains the specified id. |
void |
evict(java.lang.Object oid)
Evict the parameter instance from the second-level cache. |
void |
evictAll()
Evict the parameter instances from the second-level cache. |
void |
evictAll(java.lang.Class pcClass,
boolean subclasses)
Evict the parameter instances from the second-level cache. |
void |
evictAll(java.util.Collection oids)
Evict the parameter instances from the second-level cache. |
void |
evictAll(java.lang.Object[] oids)
Evict the parameter instances from the second-level cache. |
org.datanucleus.cache.CachedPC |
get(java.lang.Object oid)
Accessor for an object in the cache. |
int |
getNumberOfPinnedObjects()
Accessor for the number of pinned objects - not supported by Ehcache. |
int |
getNumberOfUnpinnedObjects()
Accessor for the number of unpinned objects - not supported by Ehcache. |
int |
getSize()
Accessor for the size of the cache. |
boolean |
isEmpty()
Accessor for whether the cache is empty |
void |
pin(java.lang.Object oid)
Pin the parameter instance in the second-level cache. |
void |
pinAll(java.lang.Class cls,
boolean subs)
Pin instances in the second-level cache. |
void |
pinAll(java.util.Collection oids)
Pin the parameter instances in the second-level cache. |
void |
pinAll(java.lang.Object[] oids)
Pin the parameter instances in the second-level cache. |
org.datanucleus.cache.CachedPC |
put(java.lang.Object oid,
org.datanucleus.cache.CachedPC pc)
Method to add an object to the cache under its id |
void |
unpin(java.lang.Object oid)
Unpin the parameter instance from the second-level cache. |
void |
unpinAll(java.lang.Class cls,
boolean subs)
Unpin instances from the second-level cache. |
void |
unpinAll(java.util.Collection oids)
Unpin the parameter instances from the second-level cache. |
void |
unpinAll(java.lang.Object[] oids)
Unpin the parameter instances from the second-level cache. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OSCacheLevel2Cache(org.datanucleus.OMFContext omfCtx)
omfCtx - OMF Context| Method Detail |
|---|
public void close()
close in interface org.datanucleus.cache.Level2Cachepublic void clear()
clear in interface org.datanucleus.cache.Level2CacheLevel2Cache.clear()public boolean containsOid(java.lang.Object oid)
containsOid in interface org.datanucleus.cache.Level2CacheLevel2Cache.containsOid(java.lang.Object)public org.datanucleus.cache.CachedPC get(java.lang.Object oid)
get in interface org.datanucleus.cache.Level2CacheLevel2Cache.get(java.lang.Object)public int getNumberOfPinnedObjects()
getNumberOfPinnedObjects in interface org.datanucleus.cache.Level2CacheLevel2Cache.getNumberOfPinnedObjects()public int getNumberOfUnpinnedObjects()
getNumberOfUnpinnedObjects in interface org.datanucleus.cache.Level2CacheLevel2Cache.getNumberOfUnpinnedObjects()public int getSize()
getSize in interface org.datanucleus.cache.Level2CacheLevel2Cache.getSize()public boolean isEmpty()
isEmpty in interface org.datanucleus.cache.Level2CacheLevel2Cache.isEmpty()
public org.datanucleus.cache.CachedPC put(java.lang.Object oid,
org.datanucleus.cache.CachedPC pc)
put in interface org.datanucleus.cache.Level2Cacheoid - The identitypc - The cacheable object
public void evict(java.lang.Object oid)
evict in interface org.datanucleus.cache.Level2Cacheoid - the object id of the instance to evict.public void evictAll()
evictAll in interface org.datanucleus.cache.Level2Cache
public void evictAll(java.lang.Class pcClass,
boolean subclasses)
evictAll in interface org.datanucleus.cache.Level2CachepcClass - the class of instances to evictsubclasses - if true, evict instances of subclasses alsopublic void evictAll(java.util.Collection oids)
evictAll in interface org.datanucleus.cache.Level2Cacheoids - the object ids of the instance to evict.public void evictAll(java.lang.Object[] oids)
evictAll in interface org.datanucleus.cache.Level2Cacheoids - the object ids of the instance to evict.public void pin(java.lang.Object oid)
pin in interface org.datanucleus.cache.Level2Cacheoid - the object id of the instance to pin.
public void pinAll(java.lang.Class cls,
boolean subs)
pinAll in interface org.datanucleus.cache.Level2Cachecls - the class of instances to pinsubs - if true, pin instances of subclasses alsopublic void pinAll(java.util.Collection oids)
pinAll in interface org.datanucleus.cache.Level2Cacheoids - the object ids of the instances to pin.public void pinAll(java.lang.Object[] oids)
pinAll in interface org.datanucleus.cache.Level2Cacheoids - the object ids of the instances to pin.public void unpin(java.lang.Object oid)
unpin in interface org.datanucleus.cache.Level2Cacheoid - the object id of the instance to unpin.
public void unpinAll(java.lang.Class cls,
boolean subs)
unpinAll in interface org.datanucleus.cache.Level2Cachecls - the class of instances to unpinsubs - if true, unpin instances of subclasses alsopublic void unpinAll(java.util.Collection oids)
unpinAll in interface org.datanucleus.cache.Level2Cacheoids - the object ids of the instance to evict.public void unpinAll(java.lang.Object[] oids)
unpinAll in interface org.datanucleus.cache.Level2Cacheoids - the object ids of the instance to evict.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||