SolarMetric Kodo JDO 3.3.5 generated on August 31 2005

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


Field Summary
protected  GemFireCacheWrapper _cache
           
protected  String _regionName
           
protected static String DEFAULT_CACHE_NAME
           
 
Fields inherited from class kodo.datacache.AbstractDataCache
conf, log
 
Fields inherited from interface kodo.datacache.DataCache
DEFAULT_NAME
 
Constructor Summary
GemFireDataCache()
           
 
Method Summary
protected  void clearInternal()
          Clear the cache.
 void endConfiguration()
          Invoked upon completion of bean property configuration for this object.
 String getGemfireCacheName()
          Gets the name of the GemFire region to use.
protected  DataCachePCData getInternal(Object key)
          Return the object for the given oid.
protected  boolean pinInternal(Object key)
          GemFire doesn't have a concept of pinning data.
protected  DataCachePCData putInternal(Object key, DataCachePCData value)
          Add the given object to the cache, returning the old object under the given oid.
protected  boolean recacheUpdates()
          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.
protected  DataCachePCData removeInternal(Object key)
          Remove the object under the given oid from the cache.
 void setGemfireCacheName(String name)
          Sets the name of the GemFire region to use.
 void startConfiguration()
          Invoked before bean property configuration is begun on this object.
protected  boolean unpinInternal(Object key)
          GemFire doesn't have a concept of pinning data.
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_cache

protected GemFireCacheWrapper _cache

_regionName

protected String _regionName

DEFAULT_CACHE_NAME

protected static final String DEFAULT_CACHE_NAME
Constructor Detail

GemFireDataCache

public GemFireDataCache()
Method Detail

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

SolarMetric Kodo JDO 3.3.5 generated on August 31 2005

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.