|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.cache.interceptors.Interceptor
org.jboss.cache.interceptors.BaseRpcInterceptor
org.jboss.cache.interceptors.InvalidationInterceptor
public class InvalidationInterceptor
This interceptor acts as a replacement to the replication interceptor when the CacheImpl is configured with ClusteredSyncMode as INVALIDATE.
The idea is that rather than replicating changes to all caches in a cluster when CRUD (Create, Remove, Update, Delete) methods are called, simply call evict(Fqn) on the remote caches for each changed node. This allows the remote node to look up the value in a shared cache loader which would have been updated with the changes.
Field Summary | |
---|---|
protected boolean |
optimistic
|
protected Map<GlobalTransaction,List<MethodCall>> |
txMods
|
protected TransactionTable |
txTable
|
Fields inherited from class org.jboss.cache.interceptors.BaseRpcInterceptor |
---|
defaultSynchronous |
Fields inherited from class org.jboss.cache.interceptors.Interceptor |
---|
cache, configuration, last, log, next |
Constructor Summary | |
---|---|
InvalidationInterceptor()
|
Method Summary | |
---|---|
Map<String,Object> |
dumpStatistics()
This implementation returns an empty Map. |
protected void |
findAndAddFqns(Object[] objects,
Set<Fqn> fqns,
boolean isMove)
|
long |
getInvalidations()
Returns the number of cache invalidations |
protected DataVersion |
getNodeVersion(TransactionWorkspace w,
Fqn f)
|
protected TransactionWorkspace |
getWorkspace(GlobalTransaction gtx)
|
protected void |
invalidateAcrossCluster(Fqn fqn,
TransactionWorkspace workspace,
boolean synchronous,
InvocationContext ctx)
|
protected void |
invalidateAcrossCluster(Fqn fqn,
TransactionWorkspace workspace,
InvocationContext ctx)
Deprecated. use {@link #invalidateAcrossCluster(Fqn,TransactionWorkspace,boolean,InvocationContext) |
protected void |
invalidateModifications(List<MethodCall> modifications,
TransactionWorkspace workspace,
boolean synchronous,
InvocationContext ctx)
|
protected void |
invalidateModifications(List<MethodCall> modifications,
TransactionWorkspace workspace,
InvocationContext ctx)
Deprecated. use invalidateAcrossCluster(org.jboss.cache.Fqn,org.jboss.cache.optimistic.TransactionWorkspace,boolean,InvocationContext) |
Object |
invoke(InvocationContext ctx)
|
protected Set<Fqn> |
optimisedIterator(List<MethodCall> list)
Removes non-crud methods, plus clobs together common calls to Fqn's. |
void |
resetStatistics()
This implementation is a no-op. |
void |
setCache(CacheSPI cache)
|
Methods inherited from class org.jboss.cache.interceptors.BaseRpcInterceptor |
---|
containsModifications, checkResponses, isSynchronous, putCallOnAsyncReplicationQueue, replicateCall, replicateCall |
Methods inherited from class org.jboss.cache.interceptors.Interceptor |
---|
getLast, getNext, getStatisticsEnabled, isActive, isOnePhaseCommitPrepareMehod, isPreparing, isValid, setLast, setNext, setStatisticsEnabled, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jboss.cache.interceptors.InterceptorMBean |
---|
getStatisticsEnabled, setStatisticsEnabled |
Field Detail |
---|
protected TransactionTable txTable
protected Map<GlobalTransaction,List<MethodCall>> txMods
protected boolean optimistic
Constructor Detail |
---|
public InvalidationInterceptor()
Method Detail |
---|
public void setCache(CacheSPI cache)
setCache
in class BaseRpcInterceptor
public Object invoke(InvocationContext ctx) throws Throwable
invoke
in class Interceptor
Throwable
public long getInvalidations()
InvalidationInterceptorMBean
getInvalidations
in interface InvalidationInterceptorMBean
public void resetStatistics()
Interceptor
resetStatistics
in interface InterceptorMBean
resetStatistics
in class Interceptor
public Map<String,Object> dumpStatistics()
Interceptor
dumpStatistics
in interface InterceptorMBean
dumpStatistics
in class Interceptor
protected void invalidateAcrossCluster(Fqn fqn, TransactionWorkspace workspace, InvocationContext ctx) throws Throwable
invalidateAcrossCluster(fqn, workspace, defaultSynchronous)
Throwable
protected void invalidateAcrossCluster(Fqn fqn, TransactionWorkspace workspace, boolean synchronous, InvocationContext ctx) throws Throwable
Throwable
protected DataVersion getNodeVersion(TransactionWorkspace w, Fqn f)
protected void invalidateModifications(List<MethodCall> modifications, TransactionWorkspace workspace, InvocationContext ctx) throws Throwable
invalidateAcrossCluster(org.jboss.cache.Fqn,org.jboss.cache.optimistic.TransactionWorkspace,boolean,InvocationContext)
invalidateModifications(modifications, workspace, defaultSynchronous)
Throwable
protected void invalidateModifications(List<MethodCall> modifications, TransactionWorkspace workspace, boolean synchronous, InvocationContext ctx) throws Throwable
Throwable
protected TransactionWorkspace getWorkspace(GlobalTransaction gtx)
protected void findAndAddFqns(Object[] objects, Set<Fqn> fqns, boolean isMove)
protected Set<Fqn> optimisedIterator(List<MethodCall> list)
list
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |