|
SolarMetric Kodo JDO 3.0.3 generated on February 20 2004 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--kodo.datacache.AbstractCacheImpl | +--kodo.datacache.TangosolCache
A PersistenceManagerFactory cache that delegates to a Tangosol Coherence cache. This cache can be used to share data among PersistenceManagers created from a single PersistenceManagerFactory. Batch updates are performed atomically.
Fields inherited from class kodo.datacache.AbstractCacheImpl |
cache, conf, log |
Fields inherited from interface kodo.datacache.DataCache |
DEFAULT_NAME |
Constructor Summary | |
TangosolCache()
|
Method Summary | |
protected boolean |
addExistingUpdates()
Tangosol does not automatically update objects stored in the cache, so we must re-enlist them as appropriate. |
void |
close()
Close this cache, dropping all hard references and releasing any resources that this cache maintains. |
void |
endConfiguration()
Invoked upon completion of bean property configuration for this object. |
boolean |
getDistributedCache()
Returns true if this cache will use a distributed
Tangosol cache; otherwise returns false . |
com.tangosol.net.NamedCache |
getTangosolCache()
Returns the underlying NamedCache that this
TangosolCache is using. |
String |
getTangosolCacheName()
Returns the name of the Tangosol cache to use. |
protected Map |
newMap()
Returns a new NamedCache for use as the underlying
data cache. |
boolean |
pin(Object key)
Coherence doesn't have a concept of expiring data, so pinning is meaningless. |
void |
setTangosolCacheName(String name)
Sets the name of the Tangosol cache to use. |
void |
setTangosolCacheType(String type)
If distributed , this cache implementation will
use a distibuted cache. |
void |
startConfiguration()
Invoked before bean property configuration is begun on this object. |
boolean |
unpin(Object key)
Coherence doesn't have a concept of expiring data, so unpinning is meaningless. |
Methods inherited from class kodo.datacache.AbstractCacheImpl |
addListener, batchUpdate, clear, clearListeners, containsKey, get, getCacheStatisticsString, getHitCount, getMap, getMissCount, getName, getRecordCacheStatistics, getStatistics, keyRemoved, put, registerListener, remove, removeAll, removeListener, removeListener, setConfiguration, setName, setRecordCacheStatistics, toString, updateValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TangosolCache()
Method Detail |
public com.tangosol.net.NamedCache getTangosolCache()
NamedCache
that this
TangosolCache
is using. This is not an unmodifiable
view on the map, so care should be taken with this reference.
Implementations should probably not mess with the contents of
the cache, but should only use this reference to obtain cache
metrics.protected Map newMap()
NamedCache
for use as the underlying
data cache. This implementation returns a NamedCache
obtained by invoking
CacheFactory.getDistributedCache(java.lang.String)
if the
TangosolCacheType
DataCache property is set to
distributed
or unset, or by invoking
CacheFactory.getReplicatedCache(java.lang.String)
if set to
replicated
. It uses the name specified by the
TangosolCacheName
property, or
"kodo"
if unset. To implement a more
sophisticated caching strategy, override this method.newMap
in class AbstractCacheImpl
protected boolean addExistingUpdates()
addExistingUpdates
in class AbstractCacheImpl
public boolean pin(Object key)
Map.containsKey(java.lang.Object)
.kodo.datacache.DataCache
true
if oid
's value was
pinned into the cache; false
if the
oid is not in the cache.public boolean unpin(Object key)
Map.containsKey(java.lang.Object)
.kodo.datacache.DataCache
true
if oid
's value was
unpinned from the cache; false
if the
oid is not in the cache.public void close()
DataCache
close
in class AbstractCacheImpl
public void setTangosolCacheType(String type)
distributed
, this cache implementation will
use a distibuted cache. If replicated
, this cache
implementation will use a replicated cache.public final boolean getDistributedCache()
true
if this cache will use a distributed
Tangosol cache; otherwise returns false
.public void setTangosolCacheName(String name)
public final String getTangosolCacheName()
public void startConfiguration()
Configurable
startConfiguration
in class AbstractCacheImpl
public void endConfiguration()
Configurable
endConfiguration
in class AbstractCacheImpl
|
SolarMetric Kodo JDO 3.0.3 generated on February 20 2004 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |