Package org.infinispan.interceptors.impl
Class EntryWrappingInterceptor
java.lang.Object
org.infinispan.interceptors.BaseAsyncInterceptor
org.infinispan.interceptors.DDAsyncInterceptor
org.infinispan.interceptors.impl.EntryWrappingInterceptor
- All Implemented Interfaces:
Visitor,AsyncInterceptor
- Direct Known Subclasses:
VersionedEntryWrappingInterceptor
Interceptor in charge with wrapping entries and add them in caller's context.
- Since:
- 9.0
- Author:
- Mircea Markus, Pedro Ruivo
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ClusteringDependentLogicprotected DistributionManagerFields inherited from class org.infinispan.interceptors.BaseAsyncInterceptor
cacheConfiguration -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanRead(DataCommand command) protected booleancanReadKey(Object key) protected final CompletionStage<Void> commitContextEntries(InvocationContext ctx, FlagAffectedCommand command) protected CompletionStage<Void> commitContextEntry(CacheEntry<?, ?> entry, InvocationContext ctx, FlagAffectedCommand command, Flag stateTransferFlag, boolean l1Invalidation) protected ObjectsetSkipRemoteGetsAndInvokeNextForDataCommand(InvocationContext ctx, DataWriteCommand command, CompletionStage<Void> delay) Locks the value for the keys accessed by the command to avoid being override from a remote get.protected ObjectsetSkipRemoteGetsAndInvokeNextForManyEntriesCommand(InvocationContext ctx, WriteCommand command, CompletionStage<Void> delay) Locks the value for the keys accessed by the command to avoid being override from a remote get.voidstart()final ObjectvisitClearCommand(InvocationContext ctx, ClearCommand command) visitCommitCommand(TxInvocationContext ctx, CommitCommand command) visitComputeCommand(InvocationContext ctx, ComputeCommand command) visitEvictCommand(InvocationContext ctx, EvictCommand command) visitGetAllCommand(InvocationContext ctx, GetAllCommand command) final ObjectvisitGetCacheEntryCommand(InvocationContext ctx, GetCacheEntryCommand command) final ObjectvisitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) final ObjectvisitInvalidateCommand(InvocationContext ctx, InvalidateCommand command) visitInvalidateL1Command(InvocationContext ctx, InvalidateL1Command command) final ObjectvisitPrepareCommand(TxInvocationContext ctx, PrepareCommand command) final ObjectvisitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) visitPutMapCommand(InvocationContext ctx, PutMapCommand command) visitReadOnlyKeyCommand(InvocationContext ctx, ReadOnlyKeyCommand command) visitReadOnlyManyCommand(InvocationContext ctx, ReadOnlyManyCommand command) visitReadWriteKeyCommand(InvocationContext ctx, ReadWriteKeyCommand command) visitReadWriteManyCommand(InvocationContext ctx, ReadWriteManyCommand command) final ObjectvisitRemoveCommand(InvocationContext ctx, RemoveCommand command) visitRemoveExpiredCommand(InvocationContext ctx, RemoveExpiredCommand command) final ObjectvisitReplaceCommand(InvocationContext ctx, ReplaceCommand command) visitWriteOnlyKeyCommand(InvocationContext ctx, WriteOnlyKeyCommand command) visitWriteOnlyManyCommand(InvocationContext ctx, WriteOnlyManyCommand command) protected final <P extends PrepareCommand>
ObjectwrapEntriesForPrepareAndApply(TxInvocationContext ctx, P command, InvocationSuccessFunction<P> handler) protected CompletionStage<Void> wrapEntryIfNeeded(InvocationContext ctx, AbstractDataWriteCommand command) Methods inherited from class org.infinispan.interceptors.DDAsyncInterceptor
handleDefault, visitCommand, visitEntrySetCommand, visitKeySetCommand, visitLockControlCommand, visitRollbackCommand, visitSizeCommand, visitTouchCommand, visitUnknownCommandMethods inherited from class org.infinispan.interceptors.BaseAsyncInterceptor
asyncInvokeNext, asyncInvokeNext, asyncInvokeNext, asyncValue, delayedNull, delayedValue, delayedValue, invokeNext, invokeNextAndExceptionally, invokeNextAndFinally, invokeNextAndHandle, invokeNextThenAccept, invokeNextThenApply, isSuccessfullyDone, makeStage, setNextInterceptor, valueOrException
-
Field Details
-
cdl
-
distributionManager
-
-
Constructor Details
-
EntryWrappingInterceptor
public EntryWrappingInterceptor()
-
-
Method Details
-
start
public void start() -
canRead
-
canReadKey
-
visitPrepareCommand
- Specified by:
visitPrepareCommandin interfaceVisitor- Overrides:
visitPrepareCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitCommitCommand
- Specified by:
visitCommitCommandin interfaceVisitor- Overrides:
visitCommitCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitGetKeyValueCommand
public final Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable - Specified by:
visitGetKeyValueCommandin interfaceVisitor- Overrides:
visitGetKeyValueCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitGetCacheEntryCommand
public final 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
-
visitInvalidateCommand
- Specified by:
visitInvalidateCommandin interfaceVisitor- Overrides:
visitInvalidateCommandin classDDAsyncInterceptor
-
visitClearCommand
- Specified by:
visitClearCommandin interfaceVisitor- Overrides:
visitClearCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitInvalidateL1Command
- Specified by:
visitInvalidateL1Commandin interfaceVisitor- Overrides:
visitInvalidateL1Commandin classDDAsyncInterceptor
-
visitPutKeyValueCommand
- Specified by:
visitPutKeyValueCommandin interfaceVisitor- Overrides:
visitPutKeyValueCommandin classDDAsyncInterceptor
-
visitIracPutKeyValueCommand
public final Object visitIracPutKeyValueCommand(InvocationContext ctx, IracPutKeyValueCommand command) - Specified by:
visitIracPutKeyValueCommandin interfaceVisitor- Overrides:
visitIracPutKeyValueCommandin classDDAsyncInterceptor
-
wrapEntryIfNeeded
protected CompletionStage<Void> wrapEntryIfNeeded(InvocationContext ctx, AbstractDataWriteCommand command) -
visitRemoveCommand
public final Object visitRemoveCommand(InvocationContext ctx, RemoveCommand command) throws Throwable - Specified by:
visitRemoveCommandin interfaceVisitor- Overrides:
visitRemoveCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitRemoveExpiredCommand
public Object visitRemoveExpiredCommand(InvocationContext ctx, RemoveExpiredCommand command) throws Throwable - Throws:
Throwable
-
visitReplaceCommand
public final Object visitReplaceCommand(InvocationContext ctx, ReplaceCommand command) throws Throwable - Specified by:
visitReplaceCommandin interfaceVisitor- Overrides:
visitReplaceCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitComputeCommand
- Specified by:
visitComputeCommandin interfaceVisitor- Overrides:
visitComputeCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitComputeIfAbsentCommand
public Object visitComputeIfAbsentCommand(InvocationContext ctx, ComputeIfAbsentCommand command) throws Throwable - Specified by:
visitComputeIfAbsentCommandin interfaceVisitor- Overrides:
visitComputeIfAbsentCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitPutMapCommand
- Specified by:
visitPutMapCommandin interfaceVisitor- Overrides:
visitPutMapCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitEvictCommand
- Specified by:
visitEvictCommandin interfaceVisitor- Overrides:
visitEvictCommandin classDDAsyncInterceptor- Throws:
Throwable
-
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
-
visitWriteOnlyKeyCommand
public Object visitWriteOnlyKeyCommand(InvocationContext ctx, WriteOnlyKeyCommand command) throws Throwable - Specified by:
visitWriteOnlyKeyCommandin interfaceVisitor- Overrides:
visitWriteOnlyKeyCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitReadWriteKeyValueCommand
public Object visitReadWriteKeyValueCommand(InvocationContext ctx, ReadWriteKeyValueCommand command) throws Throwable - Specified by:
visitReadWriteKeyValueCommandin interfaceVisitor- Overrides:
visitReadWriteKeyValueCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitReadWriteKeyCommand
public Object visitReadWriteKeyCommand(InvocationContext ctx, ReadWriteKeyCommand command) throws Throwable - Specified by:
visitReadWriteKeyCommandin interfaceVisitor- Overrides:
visitReadWriteKeyCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitWriteOnlyManyEntriesCommand
public Object visitWriteOnlyManyEntriesCommand(InvocationContext ctx, WriteOnlyManyEntriesCommand command) throws Throwable - Specified by:
visitWriteOnlyManyEntriesCommandin interfaceVisitor- Overrides:
visitWriteOnlyManyEntriesCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitWriteOnlyManyCommand
public Object visitWriteOnlyManyCommand(InvocationContext ctx, WriteOnlyManyCommand command) throws Throwable - Specified by:
visitWriteOnlyManyCommandin interfaceVisitor- Overrides:
visitWriteOnlyManyCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitWriteOnlyKeyValueCommand
public Object visitWriteOnlyKeyValueCommand(InvocationContext ctx, WriteOnlyKeyValueCommand command) throws Throwable - Specified by:
visitWriteOnlyKeyValueCommandin interfaceVisitor- Overrides:
visitWriteOnlyKeyValueCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitReadWriteManyCommand
public Object visitReadWriteManyCommand(InvocationContext ctx, ReadWriteManyCommand command) throws Throwable - Specified by:
visitReadWriteManyCommandin interfaceVisitor- Overrides:
visitReadWriteManyCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitReadWriteManyEntriesCommand
public Object visitReadWriteManyEntriesCommand(InvocationContext ctx, ReadWriteManyEntriesCommand command) throws Throwable - Specified by:
visitReadWriteManyEntriesCommandin interfaceVisitor- Overrides:
visitReadWriteManyEntriesCommandin classDDAsyncInterceptor- Throws:
Throwable
-
commitContextEntries
protected final CompletionStage<Void> commitContextEntries(InvocationContext ctx, FlagAffectedCommand command) -
commitContextEntry
protected CompletionStage<Void> commitContextEntry(CacheEntry<?, ?> entry, InvocationContext ctx, FlagAffectedCommand command, Flag stateTransferFlag, boolean l1Invalidation) -
setSkipRemoteGetsAndInvokeNextForManyEntriesCommand
protected Object setSkipRemoteGetsAndInvokeNextForManyEntriesCommand(InvocationContext ctx, WriteCommand command, CompletionStage<Void> delay) Locks the value for the keys accessed by the command to avoid being override from a remote get. -
setSkipRemoteGetsAndInvokeNextForDataCommand
protected Object setSkipRemoteGetsAndInvokeNextForDataCommand(InvocationContext ctx, DataWriteCommand command, CompletionStage<Void> delay) Locks the value for the keys accessed by the command to avoid being override from a remote get. -
wrapEntriesForPrepareAndApply
protected final <P extends PrepareCommand> Object wrapEntriesForPrepareAndApply(TxInvocationContext ctx, P command, InvocationSuccessFunction<P> handler) throws Throwable - Throws:
Throwable
-