Kodo 4.2.0. generated on July 28 2008

kodo.datacache
Class GemFireDataCache

java.lang.Object
  extended by org.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager
      extended by org.apache.openjpa.datacache.AbstractDataCache
          extended by kodo.datacache.GemFireDataCache
All Implemented Interfaces:
Serializable, DataCache, Configurable, Closeable, EventManager

public class GemFireDataCache
extends AbstractDataCache

A data cache that delegates to a GemStone GemFire cache. 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: - Externalized fields must externalize to a serializable type - The Kodo option of DynamicDataStructs and custom field proxies aren't currently with GemFire

See Also:
Serialized Form

Field Summary
static String DEFAULT_CACHE_NAME
           
 
Fields inherited from class org.apache.openjpa.datacache.AbstractDataCache
conf, log
 
Fields inherited from class org.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager
_listeners
 
Fields inherited from interface org.apache.openjpa.datacache.DataCache
NAME_DEFAULT
 
Constructor Summary
GemFireDataCache()
           
 
Method Summary
protected  void clearInternal()
           
 void endConfiguration()
           
 GemFireCacheWrapper getCacheWrapper()
          The internal cache.
 String getGemFireCacheName()
          Gets the name of the GemFire region to use.
protected  DataCachePCData getInternal(Object key)
           
 boolean isTransactional()
           
protected  GemFireCacheWrapper newCacheWrapper()
          Create a new GemFire cache wrapper for internal use.
protected  boolean pinInternal(Object key)
          GemFire doesn't have a concept of pinning data.
protected  DataCachePCData putInternal(Object key, DataCachePCData value)
           
protected  boolean recacheUpdates()
           
protected  void removeAllInternal(Class cls, boolean subclasses)
          Evict objects in cache by class.
protected  DataCachePCData removeInternal(Object key)
           
 void setGemfireCacheName(String name)
          Deprecated. Retained for auto-conf compatibility with old conf files.
 void setGemFireCacheName(String name)
          Sets the name of the GemFire region to use.
 void setTransactional(boolean transactional)
           
 void startConfiguration()
           
protected  boolean unpinInternal(Object key)
          GemFire doesn't have a concept of pinning data.
 void writeLock()
           
 void writeUnlock()
           
 
Methods inherited from class org.apache.openjpa.datacache.AbstractDataCache
addExpirationListener, afterCommit, clear, close, close, commit, contains, containsAll, fireEvent, get, getAll, getEvictionSchedule, getName, initialize, isClosed, keyRemoved, pin, pinAll, pinAll, put, putAllInternal, remove, removeAll, removeAll, removeAllInternal, removeAllTypeNamesInternal, removeExpirationListener, setConfiguration, setEvictionSchedule, setName, toString, unpin, unpinAll, unpinAll, update
 
Methods inherited from class org.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager
addListener, fireEvent, getListeners, hasListener, hasListeners, isFailFast, newListenerCollection, removeListener, setFailFast
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_CACHE_NAME

public static final String DEFAULT_CACHE_NAME
See Also:
Constant Field Values
Constructor Detail

GemFireDataCache

public GemFireDataCache()
Method Detail

setGemFireCacheName

public void setGemFireCacheName(String name)
Sets the name of the GemFire region to use.


setGemfireCacheName

public void setGemfireCacheName(String name)
Deprecated. Retained for auto-conf compatibility with old conf files.


getGemFireCacheName

public String getGemFireCacheName()
Gets the name of the GemFire region to use.


getCacheWrapper

public GemFireCacheWrapper getCacheWrapper()
The internal cache.


startConfiguration

public void startConfiguration()
Specified by:
startConfiguration in interface Configurable
Overrides:
startConfiguration in class AbstractDataCache

endConfiguration

public void endConfiguration()
Specified by:
endConfiguration in interface Configurable
Overrides:
endConfiguration in class AbstractDataCache

newCacheWrapper

protected GemFireCacheWrapper newCacheWrapper()
Create a new GemFire cache wrapper for internal use.


writeLock

public void writeLock()

writeUnlock

public void writeUnlock()

getInternal

protected DataCachePCData getInternal(Object key)
Specified by:
getInternal in class AbstractDataCache

putInternal

protected DataCachePCData putInternal(Object key,
                                      DataCachePCData value)
Specified by:
putInternal in class AbstractDataCache

removeAllInternal

protected void removeAllInternal(Class cls,
                                 boolean subclasses)
Evict objects in cache by class.

Specified by:
removeAllInternal in class AbstractDataCache

removeInternal

protected DataCachePCData removeInternal(Object key)
Specified by:
removeInternal in class AbstractDataCache

clearInternal

protected void clearInternal()
Specified by:
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.

Specified by:
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.

Specified by:
unpinInternal in class AbstractDataCache

recacheUpdates

protected boolean recacheUpdates()
Overrides:
recacheUpdates in class AbstractDataCache

setTransactional

public void setTransactional(boolean transactional)

isTransactional

public boolean isTransactional()

Kodo 4.2.0. generated on July 28 2008

Copyright 2001-2006 BEA Systems, Inc. All Rights Reserved.