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 void
completeManyWriteOnPrimaryOriginator(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 java.util.concurrent.CompletionStage<?>
completeSingleWriteOnPrimaryOriginator(org.infinispan.commands.write.DataWriteCommand command, Address backup, java.util.concurrent.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 java.lang.Object
handleClear(InvocationContext ctx, org.infinispan.commands.write.ClearCommand command, java.lang.Object ignored)
void
inject(CommandAckCollector collector, BiasManager biasManager)
protected java.util.concurrent.CompletionStage<ValidResponse>
manyWriteOnRemotePrimary(Address target, org.infinispan.commands.write.WriteCommand command, CommandAckCollector.MultiTargetCollector multiTargetCollector)
protected java.lang.Object
manyWriteResponse(InvocationContext ctx, org.infinispan.commands.write.WriteCommand cmd, java.lang.Object returnValue)
protected java.util.concurrent.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 java.lang.Object
singleWriteResponse(InvocationContext ctx, org.infinispan.commands.write.DataWriteCommand cmd, java.lang.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, start, visitClearCommand, visitComputeCommand, visitComputeIfAbsentCommand, visitEvictCommand, visitGetAllCommand, visitGetCacheEntryCommand, visitGetKeysInGroupCommand, visitGetKeyValueCommand, visitPutKeyValueCommand, visitPutMapCommand, visitReadOnlyKeyCommand, visitReadOnlyManyCommand, visitReadWriteKeyCommand, visitReadWriteKeyValueCommand, visitReadWriteManyCommand, visitReadWriteManyEntriesCommand, visitRemoveCommand, visitRemoveExpiredCommand, 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, visitEntrySetCommand, 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
-
inject
public void inject(CommandAckCollector collector, BiasManager biasManager)
-
singleWriteOnRemotePrimary
protected java.util.concurrent.CompletionStage<ValidResponse> singleWriteOnRemotePrimary(Address target, org.infinispan.commands.write.DataWriteCommand command)
Description copied from class:ScatteredDistributionInterceptor
This method is called by a non-owner sending write request to the primary owner- Overrides:
singleWriteOnRemotePrimary
in classScatteredDistributionInterceptor
-
manyWriteOnRemotePrimary
protected java.util.concurrent.CompletionStage<ValidResponse> manyWriteOnRemotePrimary(Address target, org.infinispan.commands.write.WriteCommand command, CommandAckCollector.MultiTargetCollector multiTargetCollector)
- Overrides:
manyWriteOnRemotePrimary
in classScatteredDistributionInterceptor
-
createMultiTargetCollector
protected <C extends org.infinispan.commands.write.WriteCommand> CommandAckCollector.MultiTargetCollector createMultiTargetCollector(C command, int primaries)
- Overrides:
createMultiTargetCollector
in classScatteredDistributionInterceptor
-
completeSingleWriteOnPrimaryOriginator
protected java.util.concurrent.CompletionStage<?> completeSingleWriteOnPrimaryOriginator(org.infinispan.commands.write.DataWriteCommand command, Address backup, java.util.concurrent.CompletionStage<?> rpcFuture)
Description copied from class:ScatteredDistributionInterceptor
This 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 providedrpcFuture
completes and all additional RPCs are complete, too. Failure in any of the RPCs will fail this future.- Overrides:
completeSingleWriteOnPrimaryOriginator
in classScatteredDistributionInterceptor
-
completeManyWriteOnPrimaryOriginator
protected void completeManyWriteOnPrimaryOriginator(org.infinispan.commands.write.WriteCommand command, Address backup, org.infinispan.interceptors.distribution.CountDownCompletableFuture future)
Description copied from class:ScatteredDistributionInterceptor
This is a hook for bias-enabled mode where the primary performs additional RPCs but replication to another node. Implementation is expected to incrementfuture
on each additional RPC and decrement it when the response arrives.- Overrides:
completeManyWriteOnPrimaryOriginator
in classScatteredDistributionInterceptor
-
singleWriteResponse
protected java.lang.Object singleWriteResponse(InvocationContext ctx, org.infinispan.commands.write.DataWriteCommand cmd, java.lang.Object returnValue)
Description copied from class:ScatteredDistributionInterceptor
This method is called by primary owner responding to the originator after write has been completed- Overrides:
singleWriteResponse
in classScatteredDistributionInterceptor
-
manyWriteResponse
protected java.lang.Object manyWriteResponse(InvocationContext ctx, org.infinispan.commands.write.WriteCommand cmd, java.lang.Object returnValue)
- Overrides:
manyWriteResponse
in classScatteredDistributionInterceptor
-
handleClear
protected java.lang.Object handleClear(InvocationContext ctx, org.infinispan.commands.write.ClearCommand command, java.lang.Object ignored)
- Overrides:
handleClear
in classScatteredDistributionInterceptor
-
-