Package org.infinispan.anchored.impl
Class AnchoredDistributionInterceptor
- java.lang.Object
-
- org.infinispan.interceptors.BaseAsyncInterceptor
-
- org.infinispan.interceptors.DDAsyncInterceptor
-
- org.infinispan.interceptors.impl.BaseRpcInterceptor
-
- org.infinispan.interceptors.impl.ClusteringInterceptor
-
- org.infinispan.interceptors.distribution.BaseDistributionInterceptor
-
- org.infinispan.interceptors.distribution.NonTxDistributionInterceptor
-
- org.infinispan.anchored.impl.AnchoredDistributionInterceptor
-
- All Implemented Interfaces:
org.infinispan.commands.Visitor,org.infinispan.interceptors.AsyncInterceptor
public class AnchoredDistributionInterceptor extends org.infinispan.interceptors.distribution.NonTxDistributionInterceptorANonTxDistributionInterceptorreplacement for anchored caches.The interceptor behaves mostly like
NonTxDistributionInterceptor, but when the primary sends the command to the backups it only sends the actual value to the key's anchor owner.If the key is new, the anchor owner is the last member of the read CH. If the key already exists in the cache, the anchor owner is preserved.
- Since:
- 11
- Author:
- Dan Berindei
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.infinispan.interceptors.distribution.BaseDistributionInterceptor
org.infinispan.interceptors.distribution.BaseDistributionInterceptor.ReadManyCommandHelper<C extends org.infinispan.commands.VisitableCommand>, org.infinispan.interceptors.distribution.BaseDistributionInterceptor.ReadOnlyManyHelper
-
-
Field Summary
-
Fields inherited from class org.infinispan.interceptors.distribution.BaseDistributionInterceptor
expirationManager, isL1Enabled, isReplicated, keyPartitioner, rvrl, timeService
-
Fields inherited from class org.infinispan.interceptors.impl.ClusteringInterceptor
cf, dataContainer, distributionManager, entryFactory, lockManager
-
-
Constructor Summary
Constructors Constructor Description AnchoredDistributionInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <C extends org.infinispan.commands.write.WriteCommand,Container,Item>
ObjecthandleReadWriteManyCommand(org.infinispan.context.InvocationContext ctx, C command, org.infinispan.interceptors.distribution.WriteManyCommandHelper<C,Item,Container> helper)protected ObjectprimaryReturnHandler(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.write.AbstractDataWriteCommand command, Object localResult)ObjectvisitPutMapCommand(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.write.PutMapCommand command)-
Methods inherited from class org.infinispan.interceptors.distribution.NonTxDistributionInterceptor
visitComputeCommand, visitComputeIfAbsentCommand, visitIracPutKeyValueCommand, visitPutKeyValueCommand, visitReadWriteKeyCommand, visitReadWriteKeyValueCommand, visitReadWriteManyCommand, visitReadWriteManyEntriesCommand, visitRemoveCommand, visitReplaceCommand, visitWriteOnlyKeyCommand, visitWriteOnlyKeyValueCommand, visitWriteOnlyManyCommand, visitWriteOnlyManyEntriesCommand
-
Methods inherited from class org.infinispan.interceptors.distribution.BaseDistributionInterceptor
configure, getLog, handleFunctionalReadManyCommand, handleNonTxWriteCommand, handleRemotelyRetrievedKeys, invokeRemotely, readNeedsRemoteValue, remoteGetMany, remoteGetSingleKey, remoteReadOnlyCommand, retrieveDistributionInfo, unwrapFunctionalManyResultOnOrigin, unwrapFunctionalResultOnOrigin, visitClearCommand, visitGetAllCommand, visitGetCacheEntryCommand, visitGetKeysInGroupCommand, visitGetKeyValueCommand, visitReadOnlyKeyCommand, visitReadOnlyManyCommand, wrapFunctionalManyResultOnNonOrigin, wrapFunctionalResultOnNonOriginOnReturn, wrapRemoteEntry
-
Methods inherited from class org.infinispan.interceptors.impl.ClusteringInterceptor
checkTopologyId, getSuccessfulResponseOrFail, init, unexpected, visitTouchCommand
-
Methods inherited from class org.infinispan.interceptors.impl.BaseRpcInterceptor
isLocalModeForced, isSynchronous, shouldInvokeRemoteTxCommand, shouldLoad, transactionRemotelyPrepared
-
Methods inherited from class org.infinispan.interceptors.DDAsyncInterceptor
handleDefault, visitCommand, visitCommitCommand, visitEntrySetCommand, visitEvictCommand, visitInvalidateCommand, visitInvalidateL1Command, visitKeySetCommand, visitLockControlCommand, visitPrepareCommand, visitRollbackCommand, visitSizeCommand, visitUnknownCommand
-
Methods inherited from class org.infinispan.interceptors.BaseAsyncInterceptor
asyncInvokeNext, asyncInvokeNext, asyncInvokeNext, asyncValue, delayedNull, delayedValue, delayedValue, invokeNext, invokeNextAndExceptionally, invokeNextAndFinally, invokeNextAndHandle, invokeNextThenAccept, invokeNextThenApply, isSuccessfullyDone, makeStage, setNextInterceptor, valueOrException
-
-
-
-
Method Detail
-
primaryReturnHandler
protected Object primaryReturnHandler(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.write.AbstractDataWriteCommand command, Object localResult)
- Overrides:
primaryReturnHandlerin classorg.infinispan.interceptors.distribution.BaseDistributionInterceptor
-
handleReadWriteManyCommand
protected <C extends org.infinispan.commands.write.WriteCommand,Container,Item> Object handleReadWriteManyCommand(org.infinispan.context.InvocationContext ctx, C command, org.infinispan.interceptors.distribution.WriteManyCommandHelper<C,Item,Container> helper) throws Exception
- Overrides:
handleReadWriteManyCommandin classorg.infinispan.interceptors.distribution.NonTxDistributionInterceptor- Throws:
Exception
-
visitPutMapCommand
public Object visitPutMapCommand(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.write.PutMapCommand command) throws Throwable
- Specified by:
visitPutMapCommandin interfaceorg.infinispan.commands.Visitor- Overrides:
visitPutMapCommandin classorg.infinispan.interceptors.distribution.NonTxDistributionInterceptor- Throws:
Throwable
-
-