|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.cache.commands.AbstractVisitor
org.jboss.cache.interceptors.base.CommandInterceptor
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.
Nested Class Summary | |
---|---|
static class |
InvalidationInterceptor.InvalidationFilterVisitor
|
Field Summary | |
---|---|
protected boolean |
optimistic
|
protected java.util.Map<GlobalTransaction,java.util.List<WriteCommand>> |
txMods
|
Fields inherited from class org.jboss.cache.interceptors.BaseRpcInterceptor |
---|
defaultSynchronous, rpcManager, txTable |
Fields inherited from class org.jboss.cache.interceptors.base.CommandInterceptor |
---|
configuration, log, trace |
Constructor Summary | |
---|---|
InvalidationInterceptor()
|
Method Summary | |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
dumpStatistics()
|
long |
getInvalidations()
|
protected DataVersion |
getNodeVersion(TransactionWorkspace w,
Fqn f)
|
boolean |
getStatisticsEnabled()
|
protected TransactionWorkspace |
getWorkspace(InvocationContext ctx)
|
void |
injectDependencies(CommandsFactory commandsFactory)
|
protected void |
invalidateAcrossCluster(Fqn fqn,
TransactionWorkspace workspace,
boolean synchronous,
InvocationContext ctx)
|
void |
resetStatistics()
|
void |
setStatisticsEnabled(boolean enabled)
|
java.lang.Object |
visitClearDataCommand(InvocationContext ctx,
ClearDataCommand command)
Visits a RemoveDataCommand. |
java.lang.Object |
visitCommitCommand(InvocationContext ctx,
CommitCommand command)
Visits a CommitCommand. |
java.lang.Object |
visitMoveCommand(InvocationContext ctx,
MoveCommand command)
Visits a MoveCommand. |
java.lang.Object |
visitOptimisticPrepareCommand(InvocationContext ctx,
OptimisticPrepareCommand command)
Visits a OptimisticPrepareCommand. |
java.lang.Object |
visitPrepareCommand(InvocationContext ctx,
PrepareCommand command)
Visits a PrepareCommand. |
java.lang.Object |
visitPutDataMapCommand(InvocationContext ctx,
PutDataMapCommand command)
Visits a PutDataMapCommand. |
java.lang.Object |
visitPutForExternalReadCommand(InvocationContext ctx,
PutForExternalReadCommand command)
Visits a PutForExternalReadCommand. |
java.lang.Object |
visitPutKeyValueCommand(InvocationContext ctx,
PutKeyValueCommand command)
Visits a PutKeyValueCommand. |
java.lang.Object |
visitRemoveKeyCommand(InvocationContext ctx,
RemoveKeyCommand command)
Visits a RemoveKeyCommand. |
java.lang.Object |
visitRemoveNodeCommand(InvocationContext ctx,
RemoveNodeCommand command)
Visits a RemoveNodeCommand. |
java.lang.Object |
visitRollbackCommand(InvocationContext ctx,
RollbackCommand command)
Visits a RollbackCommand. |
Methods inherited from class org.jboss.cache.interceptors.BaseRpcInterceptor |
---|
checkResponses, injectComponents, isLocalModeForced, isSynchronous, isTransactionalAndLocal, replicateCall, replicateCall, replicateCall, replicateCall, skipReplicationOfTransactionMethod |
Methods inherited from class org.jboss.cache.interceptors.base.CommandInterceptor |
---|
getNext, handleDefault, hasNext, invokeNextInterceptor, setNext |
Methods inherited from class org.jboss.cache.commands.AbstractVisitor |
---|
visitCollection, visitCreateNodeCommand, visitEvictFqnCommand, visitExistsNodeCommand, visitGetDataMapCommand, visitGetChildrenNamesCommand, visitGetKeysCommand, visitGetKeyValueCommand, visitGetNodeCommand, visitGravitateDataCommand, visitInvalidateCommand |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Map<GlobalTransaction,java.util.List<WriteCommand>> txMods
protected boolean optimistic
Constructor Detail |
---|
public InvalidationInterceptor()
Method Detail |
---|
public void injectDependencies(CommandsFactory commandsFactory)
public java.lang.Object visitPutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws java.lang.Throwable
Visitor
visitPutDataMapCommand
in interface Visitor
visitPutDataMapCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visit
java.lang.Throwable
- in the event of problems.public java.lang.Object visitPutForExternalReadCommand(InvocationContext ctx, PutForExternalReadCommand command) throws java.lang.Throwable
Visitor
visitPutForExternalReadCommand
in interface Visitor
visitPutForExternalReadCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visit
java.lang.Throwable
- in the event of problems.public java.lang.Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws java.lang.Throwable
Visitor
visitPutKeyValueCommand
in interface Visitor
visitPutKeyValueCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visit
java.lang.Throwable
- in the event of problems.public java.lang.Object visitRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws java.lang.Throwable
Visitor
visitRemoveNodeCommand
in interface Visitor
visitRemoveNodeCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visit
java.lang.Throwable
- in the event of problems.public java.lang.Object visitRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws java.lang.Throwable
Visitor
visitRemoveKeyCommand
in interface Visitor
visitRemoveKeyCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visit
java.lang.Throwable
- in the event of problems.public java.lang.Object visitMoveCommand(InvocationContext ctx, MoveCommand command) throws java.lang.Throwable
Visitor
visitMoveCommand
in interface Visitor
visitMoveCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visit
java.lang.Throwable
- in the event of problems.public java.lang.Object visitClearDataCommand(InvocationContext ctx, ClearDataCommand command) throws java.lang.Throwable
Visitor
visitClearDataCommand
in interface Visitor
visitClearDataCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visit
java.lang.Throwable
- in the event of problems.public java.lang.Object visitPrepareCommand(InvocationContext ctx, PrepareCommand command) throws java.lang.Throwable
Visitor
visitPrepareCommand
in interface Visitor
visitPrepareCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visit
java.lang.Throwable
- in the event of problems.public java.lang.Object visitOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws java.lang.Throwable
Visitor
visitOptimisticPrepareCommand
in interface Visitor
visitOptimisticPrepareCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visit
java.lang.Throwable
- in the event of problems.public java.lang.Object visitCommitCommand(InvocationContext ctx, CommitCommand command) throws java.lang.Throwable
Visitor
visitCommitCommand
in interface Visitor
visitCommitCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visit
java.lang.Throwable
- in the event of problems.public java.lang.Object visitRollbackCommand(InvocationContext ctx, RollbackCommand command) throws java.lang.Throwable
Visitor
visitRollbackCommand
in interface Visitor
visitRollbackCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visit
java.lang.Throwable
- in the event of problems.protected void invalidateAcrossCluster(Fqn fqn, TransactionWorkspace workspace, boolean synchronous, InvocationContext ctx) throws java.lang.Throwable
java.lang.Throwable
protected DataVersion getNodeVersion(TransactionWorkspace w, Fqn f)
protected TransactionWorkspace getWorkspace(InvocationContext ctx)
public void resetStatistics()
public java.util.Map<java.lang.String,java.lang.Object> dumpStatistics()
public boolean getStatisticsEnabled()
public void setStatisticsEnabled(boolean enabled)
public long getInvalidations()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |