Package org.infinispan.interceptors.impl
Class BaseStateTransferInterceptor
java.lang.Object
org.infinispan.interceptors.BaseAsyncInterceptor
org.infinispan.interceptors.DDAsyncInterceptor
org.infinispan.interceptors.impl.BaseStateTransferInterceptor
- All Implemented Interfaces:
Visitor,AsyncInterceptor
- Direct Known Subclasses:
StateTransferInterceptor
A base class for a state transfer interceptor. It contains the base code to avoid duplicating in the two current
different implementations.
Also, it has some utilities methods with the most common logic.
- Since:
- 9.0
- Author:
- Pedro Ruivo
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class -
Field Summary
FieldsFields inherited from class org.infinispan.interceptors.BaseAsyncInterceptor
cacheConfiguration -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final intprotected abstract LoggetLog()protected intgetNewTopologyId(Throwable ce, int currentTopologyId, TopologyAffectedCommand command) protected <C extends VisitableCommand & TopologyAffectedCommand & FlagAffectedCommand>
ObjecthandleReadCommand(InvocationContext ctx, C command) protected final voidlogRetry(int currentTopologyId, TopologyAffectedCommand cmd) protected <T extends VisitableCommand>
ObjectretryWhenDone(CompletionStage<Void> stage, int topologyId, InvocationContext ctx, T command, InvocationFinallyFunction<T> callback) voidstart()protected final voidupdateTopologyId(TopologyAffectedCommand command) visitGetAllCommand(InvocationContext ctx, GetAllCommand command) visitGetCacheEntryCommand(InvocationContext ctx, GetCacheEntryCommand command) visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) visitReadOnlyKeyCommand(InvocationContext ctx, ReadOnlyKeyCommand command) visitReadOnlyManyCommand(InvocationContext ctx, ReadOnlyManyCommand command) Methods inherited from class org.infinispan.interceptors.DDAsyncInterceptor
handleDefault, visitClearCommand, visitCommand, visitCommitCommand, visitComputeCommand, visitComputeIfAbsentCommand, visitEntrySetCommand, visitEvictCommand, visitInvalidateCommand, visitInvalidateL1Command, visitIracPutKeyValueCommand, visitKeySetCommand, visitLockControlCommand, visitPrepareCommand, visitPutKeyValueCommand, visitPutMapCommand, visitReadWriteKeyCommand, visitReadWriteKeyValueCommand, visitReadWriteManyCommand, visitReadWriteManyEntriesCommand, visitRemoveCommand, visitReplaceCommand, visitRollbackCommand, visitSizeCommand, visitTouchCommand, visitUnknownCommand, visitWriteOnlyKeyCommand, visitWriteOnlyKeyValueCommand, visitWriteOnlyManyCommand, visitWriteOnlyManyEntriesCommandMethods inherited from class org.infinispan.interceptors.BaseAsyncInterceptor
asyncInvokeNext, asyncInvokeNext, asyncInvokeNext, asyncValue, delayedNull, delayedValue, delayedValue, invokeNext, invokeNextAndExceptionally, invokeNextAndFinally, invokeNextAndHandle, invokeNextThenAccept, invokeNextThenApply, isSuccessfullyDone, makeStage, setNextInterceptor, valueOrExceptionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.infinispan.commands.Visitor
visitRemoveExpiredCommand
-
Field Details
-
stateTransferLock
-
-
Constructor Details
-
BaseStateTransferInterceptor
public BaseStateTransferInterceptor()
-
-
Method Details
-
start
public void start() -
logRetry
-
currentTopologyId
protected final int currentTopologyId() -
updateTopologyId
-
retryWhenDone
protected <T extends VisitableCommand> Object retryWhenDone(CompletionStage<Void> stage, int topologyId, InvocationContext ctx, T command, InvocationFinallyFunction<T> callback) -
visitGetKeyValueCommand
public Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable - Specified by:
visitGetKeyValueCommandin interfaceVisitor- Overrides:
visitGetKeyValueCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitGetCacheEntryCommand
public Object visitGetCacheEntryCommand(InvocationContext ctx, GetCacheEntryCommand command) throws Throwable - Specified by:
visitGetCacheEntryCommandin interfaceVisitor- Overrides:
visitGetCacheEntryCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitGetAllCommand
- Specified by:
visitGetAllCommandin interfaceVisitor- Overrides:
visitGetAllCommandin classDDAsyncInterceptor- Throws:
Throwable
-
handleReadCommand
protected <C extends VisitableCommand & TopologyAffectedCommand & FlagAffectedCommand> Object handleReadCommand(InvocationContext ctx, C command) -
getNewTopologyId
protected int getNewTopologyId(Throwable ce, int currentTopologyId, TopologyAffectedCommand command) -
visitReadOnlyKeyCommand
public Object visitReadOnlyKeyCommand(InvocationContext ctx, ReadOnlyKeyCommand command) throws Throwable - Specified by:
visitReadOnlyKeyCommandin interfaceVisitor- Overrides:
visitReadOnlyKeyCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitReadOnlyManyCommand
public Object visitReadOnlyManyCommand(InvocationContext ctx, ReadOnlyManyCommand command) throws Throwable - Specified by:
visitReadOnlyManyCommandin interfaceVisitor- Overrides:
visitReadOnlyManyCommandin classDDAsyncInterceptor- Throws:
Throwable
-
getLog
-