org.infinispan.interceptors
Class InvalidationInterceptor
java.lang.Object
org.infinispan.commands.AbstractVisitor
org.infinispan.interceptors.base.CommandInterceptor
org.infinispan.interceptors.base.BaseRpcInterceptor
org.infinispan.interceptors.InvalidationInterceptor
- All Implemented Interfaces:
- Visitor
public class InvalidationInterceptor
- extends BaseRpcInterceptor
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 write methods are called, simply
broadcast an InvalidateCommand
on the remote caches containing all keys modified. This allows the remote
cache to look up the value in a shared cache loader which would have been updated with the changes.
- Since:
- 4.0
- Author:
- Manik Surtani (manik@jboss.org)
Methods inherited from class org.infinispan.interceptors.base.BaseRpcInterceptor |
checkResponses, init, injectComponents, isLocalModeForced, isSynchronous, isTransactionalAndLocal, replicateCall, replicateCall, replicateCall, replicateCall, replicateCall, replicateCall, skipReplicationOfTransactionMethod |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
txMods
protected Map<GlobalTransaction,List<VisitableCommand>> txMods
InvalidationInterceptor
public InvalidationInterceptor()
injectDependencies
public void injectDependencies(CommandsFactory commandsFactory)
visitPutKeyValueCommand
public Object visitPutKeyValueCommand(InvocationContext ctx,
PutKeyValueCommand command)
throws Throwable
- Specified by:
visitPutKeyValueCommand
in interface Visitor
- Overrides:
visitPutKeyValueCommand
in class AbstractVisitor
- Throws:
Throwable
visitReplaceCommand
public Object visitReplaceCommand(InvocationContext ctx,
ReplaceCommand command)
throws Throwable
- Specified by:
visitReplaceCommand
in interface Visitor
- Overrides:
visitReplaceCommand
in class AbstractVisitor
- Throws:
Throwable
visitRemoveCommand
public Object visitRemoveCommand(InvocationContext ctx,
RemoveCommand command)
throws Throwable
- Specified by:
visitRemoveCommand
in interface Visitor
- Overrides:
visitRemoveCommand
in class AbstractVisitor
- Throws:
Throwable
visitClearCommand
public Object visitClearCommand(InvocationContext ctx,
ClearCommand command)
throws Throwable
- Specified by:
visitClearCommand
in interface Visitor
- Overrides:
visitClearCommand
in class AbstractVisitor
- Throws:
Throwable
visitPutMapCommand
public Object visitPutMapCommand(InvocationContext ctx,
PutMapCommand command)
throws Throwable
- Specified by:
visitPutMapCommand
in interface Visitor
- Overrides:
visitPutMapCommand
in class AbstractVisitor
- Throws:
Throwable
visitPrepareCommand
public Object visitPrepareCommand(InvocationContext ctx,
PrepareCommand command)
throws Throwable
- Specified by:
visitPrepareCommand
in interface Visitor
- Overrides:
visitPrepareCommand
in class AbstractVisitor
- Throws:
Throwable
invalidateAcrossCluster
protected void invalidateAcrossCluster(boolean synchronous,
InvocationContext ctx,
Object[] keys)
throws Throwable
- Throws:
Throwable
resetStatistics
public void resetStatistics()
getStatisticsEnabled
public boolean getStatisticsEnabled()
setStatisticsEnabled
public void setStatisticsEnabled(boolean enabled)
getInvalidations
public long getInvalidations()
Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.