|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jpox.cache.tangosol.TangosolLevel2Cache
public class TangosolLevel2Cache
Simple implementation of a plugin for use of Tangosols Coherence distributed caching product with JPOX. Please refer to www.tangosol.com for full details of their products. This plugin simply provides a wrapper to the Tangosol "NamedCache" to allow its use in JPOX.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.jpox.cache.Level2Cache |
|---|
org.jpox.cache.Level2Cache.PinnedClass |
| Constructor Summary | |
|---|---|
TangosolLevel2Cache(org.jpox.OMFContext omfCtx)
Constructor. |
|
| Method Summary | |
|---|---|
void |
clear()
Method to clear the cache |
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.jpox.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 Tangosol. |
int |
getNumberOfUnpinnedObjects()
Accessor for the number of unpinned objects - not supported by Tangosol. |
int |
getSize()
Accessor for the size of the cache. |
com.tangosol.net.NamedCache |
getTangosolCache()
Accessor for the backing Tangosol cache. |
boolean |
isEmpty()
Accessor for whether the cache is empty |
boolean |
lock(java.lang.Object oid)
Method to lock the underlying Tangosol cache. |
boolean |
lock(java.lang.Object oid,
int wait)
Method to lock the underlying Tangosol cache for a time period. |
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.jpox.cache.CachedPC |
put(java.lang.Object oid,
org.jpox.cache.CachedPC pc)
Method to add an object to the cache under its id |
boolean |
unlock(java.lang.Object oid)
Method to unlock the underlying Tangosol cache. |
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 TangosolLevel2Cache(org.jpox.OMFContext omfCtx)
omfCtx - OMF Context| Method Detail |
|---|
public com.tangosol.net.NamedCache getTangosolCache()
public void clear()
clear in interface org.jpox.cache.Level2CacheLevel2Cache.clear()public boolean containsOid(java.lang.Object oid)
containsOid in interface org.jpox.cache.Level2CacheLevel2Cache.containsOid(java.lang.Object)public boolean lock(java.lang.Object oid)
oid - The key
public boolean lock(java.lang.Object oid,
int wait)
oid - The keywait - the time period (ms)
public boolean unlock(java.lang.Object oid)
oid - The key
public org.jpox.cache.CachedPC get(java.lang.Object oid)
get in interface org.jpox.cache.Level2CacheLevel2Cache.get(java.lang.Object)public int getNumberOfPinnedObjects()
getNumberOfPinnedObjects in interface org.jpox.cache.Level2CacheLevel2Cache.getNumberOfPinnedObjects()public int getNumberOfUnpinnedObjects()
getNumberOfUnpinnedObjects in interface org.jpox.cache.Level2CacheLevel2Cache.getNumberOfUnpinnedObjects()public int getSize()
getSize in interface org.jpox.cache.Level2CacheLevel2Cache.getSize()public boolean isEmpty()
isEmpty in interface org.jpox.cache.Level2CacheLevel2Cache.isEmpty()
public org.jpox.cache.CachedPC put(java.lang.Object oid,
org.jpox.cache.CachedPC pc)
put in interface org.jpox.cache.Level2Cacheoid - The identitypc - The cacheable object
public void evict(java.lang.Object oid)
evict in interface org.jpox.cache.Level2Cacheoid - the object id of the instance to evict.public void evictAll()
evictAll in interface org.jpox.cache.Level2Cache
public void evictAll(java.lang.Class pcClass,
boolean subclasses)
evictAll in interface org.jpox.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.jpox.cache.Level2Cacheoids - the object ids of the instance to evict.public void evictAll(java.lang.Object[] oids)
evictAll in interface org.jpox.cache.Level2Cacheoids - the object ids of the instance to evict.public void pin(java.lang.Object oid)
pin in interface org.jpox.cache.Level2Cacheoid - the object id of the instance to pin.
public void pinAll(java.lang.Class cls,
boolean subs)
pinAll in interface org.jpox.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.jpox.cache.Level2Cacheoids - the object ids of the instances to pin.public void pinAll(java.lang.Object[] oids)
pinAll in interface org.jpox.cache.Level2Cacheoids - the object ids of the instances to pin.public void unpin(java.lang.Object oid)
unpin in interface org.jpox.cache.Level2Cacheoid - the object id of the instance to unpin.
public void unpinAll(java.lang.Class cls,
boolean subs)
unpinAll in interface org.jpox.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.jpox.cache.Level2Cacheoids - the object ids of the instance to evict.public void unpinAll(java.lang.Object[] oids)
unpinAll in interface org.jpox.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 | ||||||||