public class ObjectGridQueryCache
extends org.apache.openjpa.datacache.AbstractQueryCache
implements org.apache.openjpa.event.RemoteCommitListener
QueryCache implementation is a
QueryCache plugin to integrate OpenJPA with ObjectGrid for leveraging the
cluster server advantages provided by ObjectGrid.
See ObjectGridDataCache for detail configuration information.| Constructor and Description |
|---|
ObjectGridQueryCache() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
clearInternal()
Clear the query cache
|
void |
close()
Close this query cache
|
protected org.apache.openjpa.datacache.QueryResult |
getInternal(org.apache.openjpa.datacache.QueryKey qk)
Returns a query result for a given query key
|
String |
getMaxNumberOfReplicas()
Returns the maximum number of replicas for the EMBEDDED or EMBEDDED_PARTITION ObjectGrid type
|
String |
getMaxUsedMemory()
Returns setting of whether memory based eviction is enabled
|
String |
getNumberOfPartitions()
Returns the number of partitions used in the cache
|
String |
getObjectGridName()
Returns the name of the ObjectGrid that handel the cache
|
String |
getObjectGridType()
Returns the ObjectGrid type.
|
String |
getPlacementScope()
Retrieve the scope used for partition placement.
|
String |
getPlacementScopeTopology()
Retrieve the link topology used to perform intradomain replication.
|
String |
getReplicaMode()
Returns the replica mode
|
String |
getReplicaReadEnabled()
Returns whether reading from the replica is enabled
|
void |
initialize(org.apache.openjpa.datacache.DataCacheManager mgr)
Sets the configuration for initializing Query Cache
|
protected Collection |
keySet() |
protected boolean |
pinInternal(org.apache.openjpa.datacache.QueryKey qk)
This is not applicable to ObjectGrid
|
protected org.apache.openjpa.datacache.QueryResult |
putInternal(org.apache.openjpa.datacache.QueryKey qk,
org.apache.openjpa.datacache.QueryResult qr)
Caches a query result set with a given query key
|
protected org.apache.openjpa.datacache.QueryResult |
removeInternal(org.apache.openjpa.datacache.QueryKey qk)
Removes the result set associated with the given query key
|
void |
setMaxNumberOfReplicas(String numberOfReplicas)
Sets the maximum number of replicas for the EMBEDDED or EMBEDDED_PARTITION ObjectGrid type
|
void |
setMaxUsedMemory(String maxUsedMemory)
Sets whether memory based eviction is enabled
|
void |
setNumberOfPartitions(String number)
Sets the number of partitions to be used in the cache
|
void |
setObjectGridName(String name)
Sets the name of the ObjectGrid that handles the cache
|
void |
setObjectGridType(String objectGridType)
Sets the ObjectGrid type.
|
void |
setPlacementScope(String scope)
Set the scope used for partition placement.
|
void |
setPlacementScopeTopology(String scopeTopology)
Set the link topology used to perform intradomain replication.
|
void |
setReplicaMode(String mode)
Sets the replica mode
|
void |
setReplicaReadEnabled(String read)
Sets whether reading from replica is enabled
|
protected boolean |
unpinInternal(org.apache.openjpa.datacache.QueryKey qk)
This is not applicable to ObjectGrid
|
void |
writeLock()
writeLock is for synchroning the update on the cache.
|
void |
writeUnlock()
Releases writeLock, paired with writeLock() for update synchronization
|
addTypesChangedListener, afterCommit, clear, close, endConfiguration, fireEvent, get, isClosed, newListenerCollection, onTypesChanged, pin, put, remove, removeAllInternal, removeTypesChangedListener, setConfiguration, startConfiguration, unpinaddListener, fireEvent, getListeners, hasListener, hasListeners, isFailFast, removeListener, setFailFastpublic void initialize(org.apache.openjpa.datacache.DataCacheManager mgr)
initialize in interface org.apache.openjpa.datacache.QueryCacheinitialize in class org.apache.openjpa.datacache.AbstractQueryCacheQueryCache.initialize(org.apache.openjpa.datacache.DataCacheManager)public void writeLock()
writeLock in interface org.apache.openjpa.datacache.QueryCacheQueryCache.writeLock()public void writeUnlock()
writeUnlock in interface org.apache.openjpa.datacache.QueryCacheQueryCache.writeUnlock()protected org.apache.openjpa.datacache.QueryResult getInternal(org.apache.openjpa.datacache.QueryKey qk)
getInternal in class org.apache.openjpa.datacache.AbstractQueryCacheAbstractQueryCache.getInternal(org.apache.openjpa.datacache.QueryKey)protected org.apache.openjpa.datacache.QueryResult putInternal(org.apache.openjpa.datacache.QueryKey qk,
org.apache.openjpa.datacache.QueryResult qr)
putInternal in class org.apache.openjpa.datacache.AbstractQueryCacheAbstractQueryCache.putInternal(org.apache.openjpa.datacache.QueryKey, org.apache.openjpa.datacache.QueryResult)protected org.apache.openjpa.datacache.QueryResult removeInternal(org.apache.openjpa.datacache.QueryKey qk)
removeInternal in class org.apache.openjpa.datacache.AbstractQueryCacheAbstractQueryCache.removeInternal(org.apache.openjpa.datacache.QueryKey)protected void clearInternal()
clearInternal in class org.apache.openjpa.datacache.AbstractQueryCacheAbstractQueryCache.clearInternal()protected boolean pinInternal(org.apache.openjpa.datacache.QueryKey qk)
pinInternal in class org.apache.openjpa.datacache.AbstractQueryCacheAbstractQueryCache.pinInternal(org.apache.openjpa.datacache.QueryKey)protected boolean unpinInternal(org.apache.openjpa.datacache.QueryKey qk)
unpinInternal in class org.apache.openjpa.datacache.AbstractQueryCacheAbstractQueryCache.unpinInternal(org.apache.openjpa.datacache.QueryKey)public void setMaxUsedMemory(String maxUsedMemory)
public String getMaxUsedMemory()
public void setObjectGridName(String name)
public String getObjectGridName()
public void setObjectGridType(String objectGridType)
public String getObjectGridType()
public void setNumberOfPartitions(String number)
public String getNumberOfPartitions()
public void setReplicaMode(String mode)
public String getReplicaMode()
public void setReplicaReadEnabled(String read)
public String getReplicaReadEnabled()
public String getMaxNumberOfReplicas()
public void setMaxNumberOfReplicas(String numberOfReplicas)
public String getPlacementScope()
public void setPlacementScope(String scope)
scope - the placement scope for the gridpublic String getPlacementScopeTopology()
public void setPlacementScopeTopology(String scopeTopology)
scopeTopology - the link topologyprotected Collection keySet()
keySet in class org.apache.openjpa.datacache.AbstractQueryCacheAbstractQueryCache.keySet()public void close()
close in interface org.apache.openjpa.datacache.QueryCacheclose in interface org.apache.openjpa.event.RemoteCommitListenerclose in interface org.apache.openjpa.lib.util.Closeableclose in class org.apache.openjpa.datacache.AbstractQueryCacheAbstractQueryCache.close()