|
Kodo 4.1.0 generated on October 9 2006 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager
org.apache.openjpa.datacache.AbstractQueryCache
kodo.datacache.TangosolQueryCache
public class TangosolQueryCache
A query cache that delegates to a Tangosol Coherence cache. Batch updates are performed atomically.
| Field Summary | |
|---|---|
static int |
TYPE_DISTRIBUTED
|
static int |
TYPE_NAMED
|
static int |
TYPE_REPLICATED
|
| Fields inherited from class org.apache.openjpa.datacache.AbstractQueryCache |
|---|
conf, log |
| Constructor Summary | |
|---|---|
TangosolQueryCache()
|
|
| Method Summary | |
|---|---|
protected void |
clearInternal()
|
void |
close()
|
void |
endConfiguration()
|
boolean |
getClearOnClose()
Whether the contents of the named cache will be cleared when the PersistenceManagerFactory is closed. |
protected org.apache.openjpa.datacache.QueryResult |
getInternal(org.apache.openjpa.datacache.QueryKey key)
|
com.tangosol.net.NamedCache |
getTangosolCache()
|
String |
getTangosolCacheName()
Returns the name of the Tangosol cache to use. |
int |
getTangosolCacheType()
The tangosol cache type as one of the TYPE constants. |
protected Collection |
keySet()
|
protected com.tangosol.net.NamedCache |
newTangosolQueryCache(String name)
Returns a new NamedCache for use as the underlying
query cache. |
protected boolean |
pinInternal(org.apache.openjpa.datacache.QueryKey key)
Coherence doesn't have a concept of expiring data, so pinning is meaningless. |
protected org.apache.openjpa.datacache.QueryResult |
putInternal(org.apache.openjpa.datacache.QueryKey key,
org.apache.openjpa.datacache.QueryResult value)
|
protected boolean |
recacheUpdates()
Tangosol does not automatically update objects stored in the cache, so we must re-enlist them as appropriate. |
protected org.apache.openjpa.datacache.QueryResult |
removeInternal(org.apache.openjpa.datacache.QueryKey key)
|
void |
setClearOnClose(boolean clearOnClose)
Sets the option to clear the Tangosol cache when the PersistenceManagerFactory is closed. |
void |
setTangosolCacheName(String name)
Sets the name of the Tangosol cache to use. |
void |
setTangosolCacheType(int type)
The tangosol cache type as one of the TYPE constants. |
void |
setTangosolCacheType(String type)
If distributed, this cache implementation will
use a distibuted cache. |
protected boolean |
unpinInternal(org.apache.openjpa.datacache.QueryKey key)
Coherence doesn't have a concept of expiring data, so unpinning is meaningless. |
void |
writeLock()
|
void |
writeUnlock()
|
| Methods inherited from class org.apache.openjpa.datacache.AbstractQueryCache |
|---|
addTypesChangedListener, afterCommit, clear, close, fireEvent, get, initialize, isClosed, newListenerCollection, onTypesChanged, pin, put, remove, removeAllInternal, removeTypesChangedListener, setConfiguration, startConfiguration, 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 |
|---|
public static final int TYPE_DISTRIBUTED
public static final int TYPE_REPLICATED
public static final int TYPE_NAMED
| Constructor Detail |
|---|
public TangosolQueryCache()
| Method Detail |
|---|
public com.tangosol.net.NamedCache getTangosolCache()
public void setTangosolCacheName(String name)
public final String getTangosolCacheName()
public void setTangosolCacheType(int type)
public int getTangosolCacheType()
public void setTangosolCacheType(String type)
distributed, this cache implementation will
use a distibuted cache. If replicated, this cache
implementation will use a replicated cache. If left unset or
set to named, the cache is looked up through
Coherence's named-cache lookup mechanisms. This method is
primarily used for automated string-based configuration.
public void setClearOnClose(boolean clearOnClose)
public boolean getClearOnClose()
public void writeLock()
public void writeUnlock()
protected org.apache.openjpa.datacache.QueryResult getInternal(org.apache.openjpa.datacache.QueryKey key)
getInternal in class org.apache.openjpa.datacache.AbstractQueryCache
protected org.apache.openjpa.datacache.QueryResult putInternal(org.apache.openjpa.datacache.QueryKey key,
org.apache.openjpa.datacache.QueryResult value)
putInternal in class org.apache.openjpa.datacache.AbstractQueryCacheprotected org.apache.openjpa.datacache.QueryResult removeInternal(org.apache.openjpa.datacache.QueryKey key)
removeInternal in class org.apache.openjpa.datacache.AbstractQueryCacheprotected void clearInternal()
clearInternal in class org.apache.openjpa.datacache.AbstractQueryCacheprotected boolean pinInternal(org.apache.openjpa.datacache.QueryKey key)
Map.containsKey(java.lang.Object).
pinInternal in class org.apache.openjpa.datacache.AbstractQueryCacheprotected boolean unpinInternal(org.apache.openjpa.datacache.QueryKey key)
Map.containsKey(java.lang.Object).
unpinInternal in class org.apache.openjpa.datacache.AbstractQueryCacheprotected boolean recacheUpdates()
protected Collection keySet()
keySet in class org.apache.openjpa.datacache.AbstractQueryCachepublic void close()
close in interface org.apache.openjpa.datacache.QueryCacheclose in interface org.apache.openjpa.lib.util.Closeableclose in class org.apache.openjpa.datacache.AbstractQueryCachepublic void endConfiguration()
endConfiguration in interface org.apache.openjpa.lib.conf.ConfigurableendConfiguration in class org.apache.openjpa.datacache.AbstractQueryCacheprotected com.tangosol.net.NamedCache newTangosolQueryCache(String name)
NamedCache for use as the underlying
query cache. This implementation returns a NamedCache
obtained by invoking CacheFactory.getCache(java.lang.String) unless the
TangosolCacheType optional QueryCache property is
set to distributed or to replicated,
in which case CacheFactory.getDistributedCache(java.lang.String) or CacheFactory.getReplicatedCache(java.lang.String) are
invoked, as appropriate.
It uses the name specified by the
TangosolCacheName property, or
"kodo" if unset. To implement a more
sophisticated caching strategy, override this method.
|
Kodo 4.1.0 generated on October 9 2006 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||