Kodo 4.2.0. generated on July 28 2008

kodo.datacache
Class GemFireQueryCache

java.lang.Object
  extended by org.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager
      extended by org.apache.openjpa.datacache.AbstractQueryCache
          extended by kodo.datacache.GemFireQueryCache
All Implemented Interfaces:
Serializable, QueryCache, TypesChangedListener, Configurable, Closeable, EventManager

public class GemFireQueryCache
extends AbstractQueryCache

A query cache that delegates to a GemStone GemFire cache.

To use GemFire in Kodo set kodo.QueryCache to gemfire

By default, a GemFire region of root/kodo-query-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 supported with GemFire

See Also:
Serialized Form

Field Summary
static String DEFAULT_CACHE_NAME
           
 
Fields inherited from class org.apache.openjpa.datacache.AbstractQueryCache
conf, log
 
Fields inherited from class org.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager
_listeners
 
Constructor Summary
GemFireQueryCache()
           
 
Method Summary
protected  void clearInternal()
           
 void endConfiguration()
           
 String getGemFireCacheName()
          Gets the name of the GemFire cache region to use.
protected  QueryResult getInternal(QueryKey key)
           
 void initialize(DataCacheManager mgr)
           
 boolean isTransactional()
           
protected  Collection keySet()
           
protected  GemFireCacheWrapper newCacheWrapper()
          Create a new GemFire cache wrapper for internal use.
 void onTypesChanged(TypesChangedEvent ev)
           
protected  boolean pinInternal(QueryKey key)
          GemFire doesn't have a concept of pinning data.
protected  QueryResult putInternal(QueryKey key, QueryResult value)
           
protected  boolean recacheUpdates()
           
protected  QueryResult removeInternal(QueryKey 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 cache region to use.
 void setTransactional(boolean transactional)
           
 void startConfiguration()
           
protected  boolean unpinInternal(QueryKey key)
          GemFire doesn't have a concept of pinning data.
 void writeLock()
           
 void writeUnlock()
           
 
Methods inherited from class org.apache.openjpa.datacache.AbstractQueryCache
addTypesChangedListener, afterCommit, clear, close, close, fireEvent, get, isClosed, newListenerCollection, pin, put, remove, removeAllInternal, removeTypesChangedListener, setConfiguration, unpin
 
Methods inherited from class org.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager
addListener, fireEvent, getListeners, hasListener, hasListeners, isFailFast, removeListener, setFailFast
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CACHE_NAME

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

GemFireQueryCache

public GemFireQueryCache()
Method Detail

setGemFireCacheName

public void setGemFireCacheName(String name)
Sets the name of the GemFire cache 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 cache region to use.


startConfiguration

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

endConfiguration

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

newCacheWrapper

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


writeLock

public void writeLock()

writeUnlock

public void writeUnlock()

getInternal

protected QueryResult getInternal(QueryKey key)
Specified by:
getInternal in class AbstractQueryCache

putInternal

protected QueryResult putInternal(QueryKey key,
                                  QueryResult value)
Specified by:
putInternal in class AbstractQueryCache

removeInternal

protected QueryResult removeInternal(QueryKey key)
Specified by:
removeInternal in class AbstractQueryCache

clearInternal

protected void clearInternal()
Specified by:
clearInternal in class AbstractQueryCache

onTypesChanged

public void onTypesChanged(TypesChangedEvent ev)
Specified by:
onTypesChanged in interface TypesChangedListener
Overrides:
onTypesChanged in class AbstractQueryCache

pinInternal

protected boolean pinInternal(QueryKey key)
GemFire doesn't have a concept of pinning data. This method is equivalent to invoking Map#contains.

Specified by:
pinInternal in class AbstractQueryCache

unpinInternal

protected boolean unpinInternal(QueryKey key)
GemFire doesn't have a concept of pinning data. This method is equivalent to invoking Map#contains.

Specified by:
unpinInternal in class AbstractQueryCache

recacheUpdates

protected boolean recacheUpdates()

keySet

protected Collection keySet()
Specified by:
keySet in class AbstractQueryCache

initialize

public void initialize(DataCacheManager mgr)
Specified by:
initialize in interface QueryCache
Overrides:
initialize in class AbstractQueryCache

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.