Class BiasedScatteredDistributionInterceptor
- 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.ScatteredDistributionInterceptor
-
- org.infinispan.interceptors.distribution.BiasedScatteredDistributionInterceptor
-
- All Implemented Interfaces:
org.infinispan.commands.Visitor,AsyncInterceptor
public class BiasedScatteredDistributionInterceptor extends ScatteredDistributionInterceptor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.infinispan.interceptors.distribution.ScatteredDistributionInterceptor
ScatteredDistributionInterceptor.PrimaryResponseGenerator, ScatteredDistributionInterceptor.PrimaryResponseHandler
-
-
Field Summary
-
Fields inherited from class org.infinispan.interceptors.distribution.ScatteredDistributionInterceptor
cacheNotifier, functionalNotifier, groupManager, keyPartitioner, svm, timeService
-
Fields inherited from class org.infinispan.interceptors.impl.ClusteringInterceptor
cf, dataContainer, distributionManager, entryFactory, lockManager
-
Fields inherited from class org.infinispan.interceptors.impl.BaseRpcInterceptor
componentRegistry, defaultSynchronous, rpcManager
-
Fields inherited from class org.infinispan.interceptors.BaseAsyncInterceptor
cacheConfiguration
-
-
Constructor Summary
Constructors Constructor Description BiasedScatteredDistributionInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcompleteManyWriteOnPrimaryOriginator(org.infinispan.commands.write.WriteCommand command, Address backup, org.infinispan.interceptors.distribution.CountDownCompletableFuture future)This is a hook for bias-enabled mode where the primary performs additional RPCs but replication to another node.protected CompletionStage<?>completeSingleWriteOnPrimaryOriginator(org.infinispan.commands.write.DataWriteCommand command, Address backup, CompletionStage<?> rpcFuture)This is a hook for bias-enabled mode where the primary performs additional RPCs but replication to another node.protected <C extends org.infinispan.commands.write.WriteCommand>
CommandAckCollector.MultiTargetCollectorcreateMultiTargetCollector(C command, int primaries)protected voidhandleClear(InvocationContext ctx, org.infinispan.commands.VisitableCommand command, Object ignored)voidinject(CommandAckCollector collector, BiasManager biasManager)protected CompletionStage<ValidResponse>manyWriteOnRemotePrimary(Address target, org.infinispan.commands.write.WriteCommand command, CommandAckCollector.MultiTargetCollector multiTargetCollector)protected ObjectmanyWriteResponse(InvocationContext ctx, org.infinispan.commands.write.WriteCommand cmd, Object returnValue)protected CompletionStage<ValidResponse>singleWriteOnRemotePrimary(Address target, org.infinispan.commands.write.DataWriteCommand command)This method is called by a non-owner sending write request to the primary ownerprotected ObjectsingleWriteResponse(InvocationContext ctx, org.infinispan.commands.write.DataWriteCommand cmd, Object returnValue)This method is called by primary owner responding to the originator after write has been completed-
Methods inherited from class org.infinispan.interceptors.distribution.ScatteredDistributionInterceptor
getLog, scheduleKeyInvalidation, visitClearCommand, visitComputeCommand, visitComputeIfAbsentCommand, visitEvictCommand, visitGetAllCommand, visitGetCacheEntryCommand, visitGetKeysInGroupCommand, visitGetKeyValueCommand, visitPutKeyValueCommand, visitPutMapCommand, visitReadOnlyKeyCommand, visitReadOnlyManyCommand, visitReadWriteKeyCommand, visitReadWriteKeyValueCommand, visitReadWriteManyCommand, visitReadWriteManyEntriesCommand, visitRemoveCommand, visitReplaceCommand, visitWriteOnlyKeyCommand, visitWriteOnlyKeyValueCommand, visitWriteOnlyManyCommand, visitWriteOnlyManyEntriesCommand
-
Methods inherited from class org.infinispan.interceptors.impl.ClusteringInterceptor
getSuccessfulResponseOrFail, unexpected
-
Methods inherited from class org.infinispan.interceptors.impl.BaseRpcInterceptor
init, isLocalModeForced, isSynchronous, shouldInvokeRemoteTxCommand, shouldTotalOrderRollbackBeInvokedRemotely, totalOrderPrepare, totalOrderTxCommit, totalOrderTxRollback, transactionRemotelyPrepared
-
Methods inherited from class org.infinispan.interceptors.DDAsyncInterceptor
handleDefault, visitCommand, visitCommitCommand, visitDistributedExecuteCommand, visitEntrySetCommand, visitInvalidateCommand, visitInvalidateL1Command, visitKeySetCommand, visitLockControlCommand, visitPrepareCommand, visitRollbackCommand, visitSizeCommand, visitUnknownCommand
-
Methods inherited from class org.infinispan.interceptors.BaseAsyncInterceptor
asyncInvokeNext, asyncInvokeNext, asyncInvokeNext, asyncValue, delayedValue, delayedValue, invokeNext, invokeNextAndExceptionally, invokeNextAndFinally, invokeNextAndHandle, invokeNextThenAccept, invokeNextThenApply, isSuccessfullyDone, makeStage, setNextInterceptor, valueOrException
-
-
-
-
Method Detail
-
inject
public void inject(CommandAckCollector collector, BiasManager biasManager)
-
singleWriteOnRemotePrimary
protected CompletionStage<ValidResponse> singleWriteOnRemotePrimary(Address target, org.infinispan.commands.write.DataWriteCommand command)
Description copied from class:ScatteredDistributionInterceptorThis method is called by a non-owner sending write request to the primary owner- Overrides:
singleWriteOnRemotePrimaryin classScatteredDistributionInterceptor
-
manyWriteOnRemotePrimary
protected CompletionStage<ValidResponse> manyWriteOnRemotePrimary(Address target, org.infinispan.commands.write.WriteCommand command, CommandAckCollector.MultiTargetCollector multiTargetCollector)
- Overrides:
manyWriteOnRemotePrimaryin classScatteredDistributionInterceptor
-
createMultiTargetCollector
protected <C extends org.infinispan.commands.write.WriteCommand> CommandAckCollector.MultiTargetCollector createMultiTargetCollector(C command, int primaries)
- Overrides:
createMultiTargetCollectorin classScatteredDistributionInterceptor
-
completeSingleWriteOnPrimaryOriginator
protected CompletionStage<?> completeSingleWriteOnPrimaryOriginator(org.infinispan.commands.write.DataWriteCommand command, Address backup, CompletionStage<?> rpcFuture)
Description copied from class:ScatteredDistributionInterceptorThis is a hook for bias-enabled mode where the primary performs additional RPCs but replication to another node. The returned CF will be complete when both the providedrpcFuturecompletes and all additional RPCs are complete, too. Failure in any of the RPCs will fail this future.- Overrides:
completeSingleWriteOnPrimaryOriginatorin classScatteredDistributionInterceptor
-
completeManyWriteOnPrimaryOriginator
protected void completeManyWriteOnPrimaryOriginator(org.infinispan.commands.write.WriteCommand command, Address backup, org.infinispan.interceptors.distribution.CountDownCompletableFuture future)Description copied from class:ScatteredDistributionInterceptorThis is a hook for bias-enabled mode where the primary performs additional RPCs but replication to another node. Implementation is expected to incrementfutureon each additional RPC and decrement it when the response arrives.- Overrides:
completeManyWriteOnPrimaryOriginatorin classScatteredDistributionInterceptor
-
singleWriteResponse
protected Object singleWriteResponse(InvocationContext ctx, org.infinispan.commands.write.DataWriteCommand cmd, Object returnValue)
Description copied from class:ScatteredDistributionInterceptorThis method is called by primary owner responding to the originator after write has been completed- Overrides:
singleWriteResponsein classScatteredDistributionInterceptor
-
manyWriteResponse
protected Object manyWriteResponse(InvocationContext ctx, org.infinispan.commands.write.WriteCommand cmd, Object returnValue)
- Overrides:
manyWriteResponsein classScatteredDistributionInterceptor
-
handleClear
protected void handleClear(InvocationContext ctx, org.infinispan.commands.VisitableCommand command, Object ignored)
- Overrides:
handleClearin classScatteredDistributionInterceptor
-
-