|
||||||||||
| 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.MethodDispacherInterceptor
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, trace |
| Constructor Summary | |
|---|---|
InvalidationInterceptor()
|
|
| Methods inherited from class org.jboss.cache.interceptors.BaseRpcInterceptor |
|---|
containsModifications, checkResponses, isSynchronous, isTransactionalAndLocal, putCallOnAsyncReplicationQueue, replicateCall, replicateCall, replicateCall, replicateCall, skipReplicationOfTransactionMethod |
| Methods inherited from class org.jboss.cache.interceptors.Interceptor |
|---|
assertTransactionValid, getLast, getNext, getStatisticsEnabled, initLogger, isActive, isPreparing, isValid, nextInterceptor, peekNode, 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 BaseRpcInterceptorprotected boolean skipMethodCall(InvocationContext ctx)
MethodDispacherInterceptor
skipMethodCall in class MethodDispacherInterceptor
protected Object handlePutDataMethod(InvocationContext ctx,
GlobalTransaction tx,
Fqn fqn,
Map data,
boolean createUndoOps)
throws Throwable
MethodDispacherInterceptorCacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, String, java.util.Map, boolean)
handlePutDataMethod in class MethodDispacherInterceptorThrowable
protected Object handlePutDataEraseMethod(InvocationContext ctx,
GlobalTransaction gt,
Fqn fqn,
Map newData,
boolean createUndoOps,
boolean eraseContents)
throws Throwable
MethodDispacherInterceptorCacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, java.util.Map, boolean, boolean)
handlePutDataEraseMethod in class MethodDispacherInterceptorThrowable
protected Object handlePutKeyValueMethod(InvocationContext ctx,
GlobalTransaction gtx,
Fqn fqn,
Object key,
Object value,
boolean createUndoOps)
throws Throwable
MethodDispacherInterceptorCacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, String, Object, Object, boolean)
handlePutKeyValueMethod in class MethodDispacherInterceptorThrowable
protected Object handlePutDataEraseVersionedMethod(InvocationContext ctx,
GlobalTransaction gtx,
Fqn fqn,
Map data,
boolean createUndoOps,
boolean eraseContent,
DataVersion dv)
throws Throwable
MethodDispacherInterceptorCacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, java.util.Map, boolean, boolean, org.jboss.cache.optimistic.DataVersion)
handlePutDataEraseVersionedMethod in class MethodDispacherInterceptorThrowable
protected Object handlePutDataVersionedMethod(InvocationContext ctx,
GlobalTransaction globalTransaction,
Fqn fqn,
Map map,
Boolean createUndoOps,
DataVersion dataVersion)
throws Throwable
MethodDispacherInterceptorCacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, java.util.Map, boolean, org.jboss.cache.optimistic.DataVersion)
handlePutDataVersionedMethod in class MethodDispacherInterceptorThrowable
protected Object handlePutKeyValueVersionedMethod(InvocationContext ctx,
GlobalTransaction gtx,
Fqn fqn,
Object key,
Object value,
boolean createUndoOps,
DataVersion dv)
throws Throwable
MethodDispacherInterceptorCacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, Object, Object, boolean, org.jboss.cache.optimistic.DataVersion)
handlePutKeyValueVersionedMethod in class MethodDispacherInterceptorThrowable
protected Object handleRemoveNodeMethod(InvocationContext ctx,
GlobalTransaction tx,
Fqn fqn,
boolean createUndoOps)
throws Throwable
MethodDispacherInterceptorCacheImpl._remove(org.jboss.cache.transaction.GlobalTransaction, String, boolean)
handleRemoveNodeMethod in class MethodDispacherInterceptorThrowable
protected Object handleRemoveKeyMethod(InvocationContext ctx,
GlobalTransaction tx,
Fqn fqn,
Object key,
boolean createUndoOps)
throws Throwable
MethodDispacherInterceptorCacheImpl._remove(org.jboss.cache.transaction.GlobalTransaction, String, Object, boolean)
handleRemoveKeyMethod in class MethodDispacherInterceptorThrowable
protected Object handleRemoveDataMethod(InvocationContext ctx,
GlobalTransaction tx,
Fqn fqn,
boolean createUndoOps)
throws Throwable
MethodDispacherInterceptorCacheImpl._removeData(org.jboss.cache.transaction.GlobalTransaction, Fqn, boolean)
handleRemoveDataMethod in class MethodDispacherInterceptorThrowable
protected Object handleDataGravitationCleanupMethod(InvocationContext ctx,
Fqn primary,
Fqn backup)
throws Throwable
MethodDispacherInterceptorRemoteCacheInvocationDelegate.dataGravitationCleanup(org.jboss.cache.Fqn, org.jboss.cache.Fqn)
handleDataGravitationCleanupMethod in class MethodDispacherInterceptorThrowable
protected Object handleMoveMethod(InvocationContext ctx,
Fqn from,
Fqn to)
throws Throwable
MethodDispacherInterceptorCacheImpl._move(org.jboss.cache.Fqn, org.jboss.cache.Fqn)
handleMoveMethod in class MethodDispacherInterceptorThrowable
protected Object handleRemoveKeyVersionedMethod(InvocationContext ctx,
GlobalTransaction gtx,
Fqn fqn,
Object key,
boolean createUndoOps,
DataVersion dv)
throws Throwable
MethodDispacherInterceptorCacheImpl._remove(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, Object, boolean, org.jboss.cache.optimistic.DataVersion)
handleRemoveKeyVersionedMethod in class MethodDispacherInterceptorThrowable
protected Object handleRemoveNodeVersionedMethod(InvocationContext ctx,
GlobalTransaction gtx,
Fqn fqn,
boolean createUndoOps,
DataVersion dv)
throws Throwable
MethodDispacherInterceptorCacheImpl._remove(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, boolean, org.jboss.cache.optimistic.DataVersion)
handleRemoveNodeVersionedMethod in class MethodDispacherInterceptorThrowable
protected Object handleRemoveDataVersionedMethod(InvocationContext ctx,
GlobalTransaction gtx,
Fqn fqn,
boolean createUndoOps,
DataVersion dv)
throws Throwable
MethodDispacherInterceptorCacheImpl._removeData(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, boolean, org.jboss.cache.optimistic.DataVersion)
handleRemoveDataVersionedMethod in class MethodDispacherInterceptorThrowable
protected Object handlePrepareMethod(InvocationContext ctx,
GlobalTransaction gtx,
List modification,
org.jgroups.Address coordinator,
boolean onePhaseCommit)
throws Throwable
MethodDispacherInterceptorCacheImpl.prepare(org.jboss.cache.transaction.GlobalTransaction, java.util.List, org.jgroups.Address, boolean)
handlePrepareMethod in class MethodDispacherInterceptorThrowable
protected Object handleOptimisticPrepareMethod(InvocationContext ctx,
GlobalTransaction gtx,
List modifications,
Map data,
org.jgroups.Address address,
boolean onePhaseCommit)
throws Throwable
MethodDispacherInterceptorCacheImpl.optimisticPrepare(org.jboss.cache.transaction.GlobalTransaction, java.util.List, java.util.Map, org.jgroups.Address, boolean)
handleOptimisticPrepareMethod in class MethodDispacherInterceptorThrowable
protected Object handleCommitMethod(InvocationContext ctx,
GlobalTransaction globalTransaction)
throws Throwable
MethodDispacherInterceptorCacheImpl.commit(org.jboss.cache.transaction.GlobalTransaction)
handleCommitMethod in class MethodDispacherInterceptorThrowable
protected Object handleRollbackMethod(InvocationContext ctx,
GlobalTransaction globalTransaction)
throws Throwable
MethodDispacherInterceptorCacheImpl.rollback(org.jboss.cache.transaction.GlobalTransaction)
handleRollbackMethod in class MethodDispacherInterceptorThrowablepublic long getInvalidations()
InvalidationInterceptorMBean
getInvalidations in interface InvalidationInterceptorMBeanpublic void resetStatistics()
Interceptor
resetStatistics in interface InterceptorMBeanresetStatistics in class Interceptorpublic Map<String,Object> dumpStatistics()
Interceptor
dumpStatistics in interface InterceptorMBeandumpStatistics 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
Throwableprotected TransactionWorkspace getWorkspace(GlobalTransaction gtx)
@Deprecated
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 | |||||||||