kodo.datacache
Class GemFireDataCache
java.lang.Object
|
+--serp.util.AbstractEventManager
|
+--kodo.datacache.AbstractDataCache
|
+--kodo.datacache.GemFireDataCache
- All Implemented Interfaces:
- com.solarmetric.util.Closeable, Configurable, DataCache
- public class GemFireDataCache
- extends AbstractDataCache
A PersistenceManagerFactory cache that delegates to a GemStone
GemFire cache. This cache can be used to share data among
PersistenceManagers created from a single
PersistenceManagerFactory. Batch updates are performed atomically.
To use GemFire in Kodo set kodo.DataCache to
gemfire
The gemfire property enable-shared-memory=true must be set.
By default, a GemFire region of root/kodo-data-cache
is used. This can be changed be setting the optional
property CacheName
Some notes regarding using Kodo with GemFire:
- Application ID classes must be serializable (per the JOO specification)
- Classes of fields using externalizers also need to be serializable
- The Kodo option of DynamicDataStructs and custom field proxies
aren't currently with GemFire
| Methods inherited from class kodo.datacache.AbstractDataCache |
addExpirationListener, afterCommit, clear, close, commit, contains, containsAll, fireEvent, get, getEvictionSchedule, getHitRate, getHits, getMisses, getName, getStatistics, getStatisticsString, initialize, isClosed, keyRemoved, pin, pinAll, put, putAllInternal, remove, removeAll, removeAllInternal, removeExpirationListener, resetStatistics, setConfiguration, setEvictionSchedule, setName, toString, unpin, unpinAll, update |
| Methods inherited from class serp.util.AbstractEventManager |
fireEvent, getListeners, hasListener, hasListeners, registerListener, removeListener |
_cache
protected GemFireCacheWrapper _cache
_regionName
protected String _regionName
DEFAULT_CACHE_NAME
protected static final String DEFAULT_CACHE_NAME
GemFireDataCache
public GemFireDataCache()
getInternal
protected DataCachePCData getInternal(Object key)
- Description copied from class:
AbstractDataCache
- Return the object for the given oid.
- Overrides:
getInternal in class AbstractDataCache
putInternal
protected DataCachePCData putInternal(Object key,
DataCachePCData value)
- Description copied from class:
AbstractDataCache
- Add the given object to the cache, returning the old object under the
given oid.
- Overrides:
putInternal in class AbstractDataCache
removeInternal
protected DataCachePCData removeInternal(Object key)
- Description copied from class:
AbstractDataCache
- Remove the object under the given oid from the cache.
- Overrides:
removeInternal in class AbstractDataCache
clearInternal
protected void clearInternal()
- Description copied from class:
AbstractDataCache
- Clear the cache.
- Overrides:
clearInternal in class AbstractDataCache
pinInternal
protected boolean pinInternal(Object key)
- GemFire doesn't have a concept of pinning data.
This method is equivalent to invoking
Map#contains.
- Overrides:
pinInternal in class AbstractDataCache
unpinInternal
protected boolean unpinInternal(Object key)
- GemFire doesn't have a concept of pinning data.
This method is equivalent to invoking
Map#contains.
- Overrides:
unpinInternal in class AbstractDataCache
recacheUpdates
protected boolean recacheUpdates()
- Description copied from class:
AbstractDataCache
- Return
true if updates to data already in the
cache (either in AbstractDataCache.commit(java.util.Collection, java.util.Collection, java.util.Collection, java.util.Collection) or the AbstractDataCache.update(kodo.datacache.DataCachePCData))
should be put back into the cache. Returns false by default.
- Overrides:
recacheUpdates in class AbstractDataCache
setGemfireCacheName
public void setGemfireCacheName(String name)
- Sets the name of the GemFire region to use.
getGemfireCacheName
public String getGemfireCacheName()
- Gets the name of the GemFire region to use.
startConfiguration
public void startConfiguration()
- Description copied from interface:
Configurable
- Invoked before bean property configuration is begun on this object.
- Overrides:
startConfiguration in class AbstractDataCache
endConfiguration
public void endConfiguration()
- Description copied from interface:
Configurable
- Invoked upon completion of bean property configuration for this object.
- Overrides:
endConfiguration in class AbstractDataCache
Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.