|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.cache.AbstractLevel2Cache
org.datanucleus.cache.coherence.CoherenceLevel2Cache
public class CoherenceLevel2Cache
Simple implementation of a plugin for use of Oracles Coherence distributed caching product with DataNucleus. Please refer to www.tangosol.com for full details of their products. This plugin simply provides a wrapper to the Coherence "NamedCache" to allow its use in DataNucleus.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.datanucleus.cache.Level2Cache |
|---|
org.datanucleus.cache.Level2Cache.PinnedClass |
| Field Summary |
|---|
| Fields inherited from class org.datanucleus.cache.AbstractLevel2Cache |
|---|
cacheName, clearAtClose, LOCALISER, maxSize, nucleusCtx, timeout |
| Constructor Summary | |
|---|---|
CoherenceLevel2Cache(org.datanucleus.NucleusContext nucleusCtx)
Constructor. |
|
| Method Summary | |
|---|---|
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. |
org.datanucleus.cache.CachedPC |
get(Object oid)
Accessor for an object in the cache. |
com.tangosol.net.NamedCache |
getCoherenceCache()
Accessor for the backing Coherence cache. |
int |
getSize()
Accessor for the size of the cache. |
boolean |
isEmpty()
Accessor for whether the cache is empty |
boolean |
lock(Object oid)
Method to lock the underlying Coherence cache. |
boolean |
lock(Object oid,
int wait)
Method to lock the underlying Coherence cache for a time period. |
org.datanucleus.cache.CachedPC |
put(Object oid,
org.datanucleus.cache.CachedPC pc)
Method to add an object to the cache under its id |
boolean |
unlock(Object oid)
Method to unlock the underlying Coherence cache. |
| Methods inherited from class org.datanucleus.cache.AbstractLevel2Cache |
|---|
getAll, getNumberOfPinnedObjects, getNumberOfUnpinnedObjects, pin, pinAll, pinAll, pinAll, putAll, unpin, unpinAll, unpinAll, unpinAll |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CoherenceLevel2Cache(org.datanucleus.NucleusContext nucleusCtx)
nucleusCtx - Context| Method Detail |
|---|
public void close()
public com.tangosol.net.NamedCache getCoherenceCache()
public boolean containsOid(Object oid)
Level2Cache.containsOid(java.lang.Object)public boolean lock(Object oid)
oid - The key
public boolean lock(Object oid,
int wait)
oid - The keywait - the time period (ms)
public boolean unlock(Object oid)
oid - The key
public org.datanucleus.cache.CachedPC get(Object oid)
Level2Cache.get(java.lang.Object)public int getSize()
Level2Cache.getSize()public boolean isEmpty()
isEmpty in interface org.datanucleus.cache.Level2CacheisEmpty in class org.datanucleus.cache.AbstractLevel2CacheLevel2Cache.isEmpty()
public org.datanucleus.cache.CachedPC put(Object oid,
org.datanucleus.cache.CachedPC pc)
oid - The identitypc - The cacheable object
public void evict(Object oid)
oid - the object id of the instance to evict.public void evictAll()
public void evictAll(Class pcClass,
boolean subclasses)
pcClass - the class of instances to evictsubclasses - if true, evict instances of subclasses alsopublic 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||