|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jpox.cache.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 |
| Nested classes/interfaces inherited from interface javax.jdo.datastore.DataStoreCache |
|---|
javax.jdo.datastore.DataStoreCache.EmptyDataStoreCache |
| Constructor Summary | |
|---|---|
TangosolLevel2Cache(java.util.Properties props)
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)
|
void |
evictAll()
|
void |
evictAll(java.lang.Class pcClass,
boolean subclasses)
|
void |
evictAll(java.util.Collection oids)
|
void |
evictAll(java.lang.Object[] oids)
|
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)
|
void |
pinAll(java.lang.Class cls,
boolean subs)
|
void |
pinAll(java.util.Collection oids)
|
void |
pinAll(java.lang.Object[] oids)
|
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)
|
void |
unpinAll(java.lang.Class cls,
boolean subs)
|
void |
unpinAll(java.util.Collection oids)
|
void |
unpinAll(java.lang.Object[] oids)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TangosolLevel2Cache(java.util.Properties props)
props - Any properties to control the cache| 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 javax.jdo.datastore.DataStoreCacheDataStoreCache.evict(java.lang.Object)public void evictAll()
evictAll in interface javax.jdo.datastore.DataStoreCacheDataStoreCache.evictAll()
public void evictAll(java.lang.Class pcClass,
boolean subclasses)
evictAll in interface javax.jdo.datastore.DataStoreCacheDataStoreCache.evictAll(java.lang.Class, boolean)public void evictAll(java.util.Collection oids)
evictAll in interface javax.jdo.datastore.DataStoreCacheDataStoreCache.evictAll(java.util.Collection)public void evictAll(java.lang.Object[] oids)
evictAll in interface javax.jdo.datastore.DataStoreCacheDataStoreCache.evictAll(java.lang.Object[])public void pin(java.lang.Object oid)
pin in interface javax.jdo.datastore.DataStoreCacheDataStoreCache.pin(java.lang.Object)
public void pinAll(java.lang.Class cls,
boolean subs)
pinAll in interface javax.jdo.datastore.DataStoreCacheDataStoreCache.pinAll(java.lang.Class, boolean)public void pinAll(java.util.Collection oids)
pinAll in interface javax.jdo.datastore.DataStoreCacheDataStoreCache.pinAll(java.util.Collection)public void pinAll(java.lang.Object[] oids)
pinAll in interface javax.jdo.datastore.DataStoreCacheDataStoreCache.pinAll(java.lang.Object[])public void unpin(java.lang.Object oid)
unpin in interface javax.jdo.datastore.DataStoreCacheDataStoreCache.unpin(java.lang.Object)
public void unpinAll(java.lang.Class cls,
boolean subs)
unpinAll in interface javax.jdo.datastore.DataStoreCacheDataStoreCache.unpinAll(java.lang.Class, boolean)public void unpinAll(java.util.Collection oids)
unpinAll in interface javax.jdo.datastore.DataStoreCacheDataStoreCache.unpinAll(java.util.Collection)public void unpinAll(java.lang.Object[] oids)
unpinAll in interface javax.jdo.datastore.DataStoreCacheDataStoreCache.unpinAll(java.lang.Object[])
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||