Package org.infinispan.statetransfer
Class StateTransferInterceptor
- java.lang.Object
-
- org.infinispan.interceptors.BaseAsyncInterceptor
-
- org.infinispan.interceptors.DDAsyncInterceptor
-
- org.infinispan.interceptors.impl.BaseStateTransferInterceptor
-
- org.infinispan.statetransfer.StateTransferInterceptor
-
- All Implemented Interfaces:
org.infinispan.commands.Visitor,AsyncInterceptor
public class StateTransferInterceptor extends org.infinispan.interceptors.impl.BaseStateTransferInterceptorThis interceptor has two tasks:- If the command's topology id is higher than the current topology id, wait for the node to receive transaction data for the new topology id.
- If the topology id changed during a command's execution, retry the command, but only on the originator (which replicates it to the new owners).
- Author:
- anistor@redhat.com
-
-
Field Summary
-
Fields inherited from class org.infinispan.interceptors.impl.BaseStateTransferInterceptor
stateTransferLock
-
Fields inherited from class org.infinispan.interceptors.BaseAsyncInterceptor
cacheConfiguration
-
-
Constructor Summary
Constructors Constructor Description StateTransferInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.infinispan.util.logging.LoggetLog()java.lang.ObjecthandleDefault(InvocationContext ctx, org.infinispan.commands.VisitableCommand command)java.lang.ObjectvisitClearCommand(InvocationContext ctx, org.infinispan.commands.write.ClearCommand command)java.lang.ObjectvisitCommitCommand(org.infinispan.context.impl.TxInvocationContext ctx, org.infinispan.commands.tx.CommitCommand command)java.lang.ObjectvisitComputeCommand(InvocationContext ctx, org.infinispan.commands.write.ComputeCommand command)java.lang.ObjectvisitComputeIfAbsentCommand(InvocationContext ctx, org.infinispan.commands.write.ComputeIfAbsentCommand command)java.lang.ObjectvisitEvictCommand(InvocationContext ctx, org.infinispan.commands.write.EvictCommand command)java.lang.ObjectvisitInvalidateCommand(InvocationContext ctx, org.infinispan.commands.write.InvalidateCommand command)java.lang.ObjectvisitInvalidateL1Command(InvocationContext ctx, org.infinispan.commands.write.InvalidateL1Command command)java.lang.ObjectvisitLockControlCommand(org.infinispan.context.impl.TxInvocationContext ctx, org.infinispan.commands.control.LockControlCommand command)java.lang.ObjectvisitPrepareCommand(org.infinispan.context.impl.TxInvocationContext ctx, org.infinispan.commands.tx.PrepareCommand command)java.lang.ObjectvisitPutKeyValueCommand(InvocationContext ctx, org.infinispan.commands.write.PutKeyValueCommand command)java.lang.ObjectvisitPutMapCommand(InvocationContext ctx, org.infinispan.commands.write.PutMapCommand command)java.lang.ObjectvisitReadWriteKeyCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadWriteKeyCommand command)java.lang.ObjectvisitReadWriteKeyValueCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadWriteKeyValueCommand command)java.lang.ObjectvisitReadWriteManyCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadWriteManyCommand command)java.lang.ObjectvisitReadWriteManyEntriesCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadWriteManyEntriesCommand command)java.lang.ObjectvisitRemoveCommand(InvocationContext ctx, org.infinispan.commands.write.RemoveCommand command)java.lang.ObjectvisitReplaceCommand(InvocationContext ctx, org.infinispan.commands.write.ReplaceCommand command)java.lang.ObjectvisitRollbackCommand(org.infinispan.context.impl.TxInvocationContext ctx, org.infinispan.commands.tx.RollbackCommand command)java.lang.ObjectvisitWriteOnlyKeyCommand(InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyKeyCommand command)java.lang.ObjectvisitWriteOnlyKeyValueCommand(InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyKeyValueCommand command)java.lang.ObjectvisitWriteOnlyManyCommand(InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyManyCommand command)java.lang.ObjectvisitWriteOnlyManyEntriesCommand(InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyManyEntriesCommand command)-
Methods inherited from class org.infinispan.interceptors.impl.BaseStateTransferInterceptor
currentTopologyId, getNewTopologyId, handleReadCommand, logRetry, retryWhenDone, start, updateTopologyId, visitGetAllCommand, visitGetCacheEntryCommand, visitGetKeysInGroupCommand, visitGetKeyValueCommand, visitReadOnlyKeyCommand, visitReadOnlyManyCommand
-
Methods inherited from class org.infinispan.interceptors.DDAsyncInterceptor
visitCommand, visitEntrySetCommand, visitKeySetCommand, visitSizeCommand, visitUnknownCommand
-
Methods inherited from class org.infinispan.interceptors.BaseAsyncInterceptor
asyncInvokeNext, asyncInvokeNext, asyncInvokeNext, asyncValue, invokeNext, invokeNextAndExceptionally, invokeNextAndFinally, invokeNextAndHandle, invokeNextThenAccept, invokeNextThenApply, isSuccessfullyDone, makeStage, setNextInterceptor, valueOrException
-
-
-
-
Method Detail
-
visitPrepareCommand
public java.lang.Object visitPrepareCommand(org.infinispan.context.impl.TxInvocationContext ctx, org.infinispan.commands.tx.PrepareCommand command) throws java.lang.Throwable- Specified by:
visitPrepareCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitPrepareCommandin classDDAsyncInterceptor- Throws:
java.lang.Throwable
-
visitCommitCommand
public java.lang.Object visitCommitCommand(org.infinispan.context.impl.TxInvocationContext ctx, org.infinispan.commands.tx.CommitCommand command) throws java.lang.Throwable- Specified by:
visitCommitCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitCommitCommandin classDDAsyncInterceptor- Throws:
java.lang.Throwable
-
visitRollbackCommand
public java.lang.Object visitRollbackCommand(org.infinispan.context.impl.TxInvocationContext ctx, org.infinispan.commands.tx.RollbackCommand command) throws java.lang.Throwable- Specified by:
visitRollbackCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitRollbackCommandin classDDAsyncInterceptor- Throws:
java.lang.Throwable
-
visitLockControlCommand
public java.lang.Object visitLockControlCommand(org.infinispan.context.impl.TxInvocationContext ctx, org.infinispan.commands.control.LockControlCommand command) throws java.lang.Throwable- Specified by:
visitLockControlCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitLockControlCommandin classDDAsyncInterceptor- Throws:
java.lang.Throwable
-
visitPutKeyValueCommand
public java.lang.Object visitPutKeyValueCommand(InvocationContext ctx, org.infinispan.commands.write.PutKeyValueCommand command) throws java.lang.Throwable
- Specified by:
visitPutKeyValueCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitPutKeyValueCommandin classDDAsyncInterceptor- Throws:
java.lang.Throwable
-
visitPutMapCommand
public java.lang.Object visitPutMapCommand(InvocationContext ctx, org.infinispan.commands.write.PutMapCommand command) throws java.lang.Throwable
- Specified by:
visitPutMapCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitPutMapCommandin classDDAsyncInterceptor- Throws:
java.lang.Throwable
-
visitRemoveCommand
public java.lang.Object visitRemoveCommand(InvocationContext ctx, org.infinispan.commands.write.RemoveCommand command) throws java.lang.Throwable
- Specified by:
visitRemoveCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitRemoveCommandin classDDAsyncInterceptor- Throws:
java.lang.Throwable
-
visitReplaceCommand
public java.lang.Object visitReplaceCommand(InvocationContext ctx, org.infinispan.commands.write.ReplaceCommand command) throws java.lang.Throwable
- Specified by:
visitReplaceCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitReplaceCommandin classDDAsyncInterceptor- Throws:
java.lang.Throwable
-
visitComputeCommand
public java.lang.Object visitComputeCommand(InvocationContext ctx, org.infinispan.commands.write.ComputeCommand command) throws java.lang.Throwable
- Specified by:
visitComputeCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitComputeCommandin classDDAsyncInterceptor- Throws:
java.lang.Throwable
-
visitComputeIfAbsentCommand
public java.lang.Object visitComputeIfAbsentCommand(InvocationContext ctx, org.infinispan.commands.write.ComputeIfAbsentCommand command) throws java.lang.Throwable
- Specified by:
visitComputeIfAbsentCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitComputeIfAbsentCommandin classDDAsyncInterceptor- Throws:
java.lang.Throwable
-
visitClearCommand
public java.lang.Object visitClearCommand(InvocationContext ctx, org.infinispan.commands.write.ClearCommand command) throws java.lang.Throwable
- Specified by:
visitClearCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitClearCommandin classDDAsyncInterceptor- Throws:
java.lang.Throwable
-
visitInvalidateCommand
public java.lang.Object visitInvalidateCommand(InvocationContext ctx, org.infinispan.commands.write.InvalidateCommand command) throws java.lang.Throwable
- Specified by:
visitInvalidateCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitInvalidateCommandin classDDAsyncInterceptor- Throws:
java.lang.Throwable
-
visitInvalidateL1Command
public java.lang.Object visitInvalidateL1Command(InvocationContext ctx, org.infinispan.commands.write.InvalidateL1Command command) throws java.lang.Throwable
- Specified by:
visitInvalidateL1Commandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitInvalidateL1Commandin classDDAsyncInterceptor- Throws:
java.lang.Throwable
-
visitEvictCommand
public java.lang.Object visitEvictCommand(InvocationContext ctx, org.infinispan.commands.write.EvictCommand command) throws java.lang.Throwable
- Specified by:
visitEvictCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitEvictCommandin classDDAsyncInterceptor- Throws:
java.lang.Throwable
-
visitReadWriteKeyValueCommand
public java.lang.Object visitReadWriteKeyValueCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadWriteKeyValueCommand command) throws java.lang.Throwable
- Specified by:
visitReadWriteKeyValueCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitReadWriteKeyValueCommandin classDDAsyncInterceptor- Throws:
java.lang.Throwable
-
visitReadWriteKeyCommand
public java.lang.Object visitReadWriteKeyCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadWriteKeyCommand command) throws java.lang.Throwable
- Specified by:
visitReadWriteKeyCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitReadWriteKeyCommandin classDDAsyncInterceptor- Throws:
java.lang.Throwable
-
visitWriteOnlyKeyCommand
public java.lang.Object visitWriteOnlyKeyCommand(InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyKeyCommand command) throws java.lang.Throwable
- Specified by:
visitWriteOnlyKeyCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitWriteOnlyKeyCommandin classDDAsyncInterceptor- Throws:
java.lang.Throwable
-
visitWriteOnlyManyEntriesCommand
public java.lang.Object visitWriteOnlyManyEntriesCommand(InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyManyEntriesCommand command) throws java.lang.Throwable
- Specified by:
visitWriteOnlyManyEntriesCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitWriteOnlyManyEntriesCommandin classDDAsyncInterceptor- Throws:
java.lang.Throwable
-
visitWriteOnlyKeyValueCommand
public java.lang.Object visitWriteOnlyKeyValueCommand(InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyKeyValueCommand command) throws java.lang.Throwable
- Specified by:
visitWriteOnlyKeyValueCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitWriteOnlyKeyValueCommandin classDDAsyncInterceptor- Throws:
java.lang.Throwable
-
visitWriteOnlyManyCommand
public java.lang.Object visitWriteOnlyManyCommand(InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyManyCommand command) throws java.lang.Throwable
- Specified by:
visitWriteOnlyManyCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitWriteOnlyManyCommandin classDDAsyncInterceptor- Throws:
java.lang.Throwable
-
visitReadWriteManyCommand
public java.lang.Object visitReadWriteManyCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadWriteManyCommand command) throws java.lang.Throwable
- Specified by:
visitReadWriteManyCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitReadWriteManyCommandin classDDAsyncInterceptor- Throws:
java.lang.Throwable
-
visitReadWriteManyEntriesCommand
public java.lang.Object visitReadWriteManyEntriesCommand(InvocationContext ctx, org.infinispan.commands.functional.ReadWriteManyEntriesCommand command) throws java.lang.Throwable
- Specified by:
visitReadWriteManyEntriesCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitReadWriteManyEntriesCommandin classDDAsyncInterceptor- Throws:
java.lang.Throwable
-
handleDefault
public java.lang.Object handleDefault(InvocationContext ctx, org.infinispan.commands.VisitableCommand command) throws java.lang.Throwable
- Overrides:
handleDefaultin classDDAsyncInterceptor- Throws:
java.lang.Throwable
-
getLog
protected org.infinispan.util.logging.Log getLog()
- Specified by:
getLogin classorg.infinispan.interceptors.impl.BaseStateTransferInterceptor
-
-