SolarMetric Kodo JDO 3.4.1 generated on May 30 2006

kodo.datacache
Class GemFireQueryCache

java.lang.Object
  |
  +--serp.util.AbstractEventManager
        |
        +--kodo.datacache.AbstractQueryCache
              |
              +--kodo.datacache.GemFireQueryCache
All Implemented Interfaces:
com.solarmetric.util.Closeable, Configurable, QueryCache

public class GemFireQueryCache
extends AbstractQueryCache

A PersistenceManagerFactory 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: - Application ID classes must be serializable (per the JDO specification) - Externalized fields must externalize to a serializable type - The Kodo option of DynamicDataStructs and custom field proxies aren't currently supported with GemFire


Field Summary
protected  GemFireCacheWrapper _cache
           
protected  String _regionName
           
protected static String DEFAULT_CACHE_NAME
           
 
Fields inherited from class kodo.datacache.AbstractQueryCache
conf, log
 
Constructor Summary
GemFireQueryCache()
           
 
Method Summary
 void classesChanged(Collection classes)
          Tells the cache that all the classes in the classes set have been changed.
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 cache region to use.
protected  QueryResult getInternal(QueryKey key)
          Return the list for the given key.
protected  Collection keySet()
          Return a threadsafe view of the keys in this cache.
protected  boolean pinInternal(QueryKey key)
          GemFire doesn't have a concept of pinning data.
protected  QueryResult putInternal(QueryKey key, QueryResult value)
          Add the given result to the cache, returning the old result under the given key.
protected  boolean recacheUpdates()
           
protected  QueryResult removeInternal(QueryKey key)
          Remove the result under the given key from the cache.
 void setGemfireCacheName(String name)
          Sets the name of the GemFire cache region to use.
 void startConfiguration()
          Invoked before bean property configuration is begun on this object.
protected  boolean unpinInternal(QueryKey key)
          GemFire doesn't have a concept of pinning data.
 
Methods inherited from class kodo.datacache.AbstractQueryCache
addExpirationListener, afterCommit, clear, close, closeWithoutClear, fireEvent, get, getHitRate, getHits, getMisses, getStatistics, getStatisticsString, isClosed, keyRemoved, newListenerCollection, pin, put, remove, removeAllInternal, removeExpirationListener, resetStatistics, setConfiguration, unpin
 
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, toString, wait, wait, wait
 

Field Detail

DEFAULT_CACHE_NAME

protected static final String DEFAULT_CACHE_NAME

_cache

protected GemFireCacheWrapper _cache

_regionName

protected String _regionName
Constructor Detail

GemFireQueryCache

public GemFireQueryCache()
Method Detail

classesChanged

public void classesChanged(Collection classes)
Description copied from interface: QueryCache

Tells the cache that all the classes in the classes set have been changed. This could mean that items have been updated, deleted, or added. This limits the QueryCache to only be able to invalidate cached queries -- because the cache is not notified of actual changes, it cannot recompute query results.

After this method is invoked, all cached results that correspond to queries that use one of the classes in classes will be dropped.

Overrides:
classesChanged in class AbstractQueryCache
Following copied from interface: kodo.datacache.QueryCache
Parameters:
classes - a set of Class objects that correspond to instances that have changed

getInternal

protected QueryResult getInternal(QueryKey key)
Description copied from class: AbstractQueryCache
Return the list for the given key.
Overrides:
getInternal in class AbstractQueryCache

putInternal

protected QueryResult putInternal(QueryKey key,
                                  QueryResult value)
Description copied from class: AbstractQueryCache
Add the given result to the cache, returning the old result under the given key.
Overrides:
putInternal in class AbstractQueryCache

removeInternal

protected QueryResult removeInternal(QueryKey key)
Description copied from class: AbstractQueryCache
Remove the result under the given key from the cache.
Overrides:
removeInternal in class AbstractQueryCache

clearInternal

protected void clearInternal()
Description copied from class: AbstractQueryCache
Clear the cache.
Overrides:
clearInternal 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.
Overrides:
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.
Overrides:
unpinInternal in class AbstractQueryCache

recacheUpdates

protected boolean recacheUpdates()

keySet

protected Collection keySet()
Description copied from class: AbstractQueryCache
Return a threadsafe view of the keys in this cache. This collection must be iteratable without risk of concurrent modification exceptions. It does not have to implement contains() efficiently or use set semantics.
Overrides:
keySet in class AbstractQueryCache

setGemfireCacheName

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

getGemfireCacheName

public String getGemfireCacheName()
Gets the name of the GemFire cache 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 AbstractQueryCache

endConfiguration

public void endConfiguration()
Description copied from interface: Configurable
Invoked upon completion of bean property configuration for this object.
Overrides:
endConfiguration in class AbstractQueryCache

SolarMetric Kodo JDO 3.4.1 generated on May 30 2006

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