public class TriangleDistributionInterceptor extends BaseDistributionInterceptor
It is implemented based on the Triangle algorithm.
The GetKeyValueCommand
reads the value locally if it is available (the node is an owner or the value is
stored in L1). If it isn't available, a remote request is made. The DataWriteCommand
is performed as follow:
BackupWriteCommand
to the backup owners; releases the lock; sends the
SuccessfulResponse
or UnsuccessfulResponse
back to the originator.BackupAckCommand
back to the originator.PutMapCommand
is performed in a similar way: BackupMultiKeyAckCommand
to the originator.CommandAckCollector
.
If a topology changes while a command is executed, an OutdatedTopologyException
is thrown. The StateTransferInterceptor
will catch it and retries the command.
TODO: finish the wiki page and add a link to it!
BaseDistributionInterceptor.ReadManyCommandHelper<C extends VisitableCommand>, BaseDistributionInterceptor.ReadOnlyManyHelper
ClusteringInterceptor.ClusteredGetAllFuture
expirationManager, isL1Enabled, isReplicated, keyPartitioner, rvrl, timeService
cf, dataContainer, distributionManager, entryFactory, lockManager
componentRegistry, defaultSynchronous, rpcManager
cacheConfiguration
Constructor and Description |
---|
TriangleDistributionInterceptor() |
checkTopologyId, configure, getLog, handleFunctionalReadManyCommand, handleNonTxWriteCommand, handleRemotelyRetrievedKeys, invokeRemotely, primaryReturnHandler, readNeedsRemoteValue, remoteGetMany, remoteGetSingleKey, remoteReadOnlyCommand, retrieveDistributionInfo, unwrapFunctionalManyResultOnOrigin, unwrapFunctionalResultOnOrigin, visitClearCommand, visitGetAllCommand, visitGetCacheEntryCommand, visitGetKeysInGroupCommand, visitGetKeyValueCommand, visitReadOnlyKeyCommand, visitReadOnlyManyCommand, wrapFunctionalManyResultOnNonOrigin, wrapFunctionalResultOnNonOriginOnReturn, wrapRemoteEntry
getSuccessfulResponseOrFail, unexpected
init, isLocalModeForced, isSynchronous, shouldInvokeRemoteTxCommand, transactionRemotelyPrepared
handleDefault, visitCommand, visitCommitCommand, visitEntrySetCommand, visitEvictCommand, visitInvalidateCommand, visitInvalidateL1Command, visitKeySetCommand, visitLockControlCommand, visitPrepareCommand, visitRollbackCommand, visitSizeCommand, visitUnknownCommand
asyncInvokeNext, asyncInvokeNext, asyncInvokeNext, asyncValue, delayedNull, delayedValue, delayedValue, invokeNext, invokeNextAndExceptionally, invokeNextAndFinally, invokeNextAndHandle, invokeNextThenAccept, invokeNextThenApply, isSuccessfullyDone, makeStage, setNextInterceptor, valueOrException
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
visitRemoveExpiredCommand
public void start()
public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
visitPutKeyValueCommand
in interface Visitor
visitPutKeyValueCommand
in class DDAsyncInterceptor
Throwable
public Object visitRemoveCommand(InvocationContext ctx, RemoveCommand command) throws Throwable
visitRemoveCommand
in interface Visitor
visitRemoveCommand
in class DDAsyncInterceptor
Throwable
public Object visitReplaceCommand(InvocationContext ctx, ReplaceCommand command) throws Throwable
visitReplaceCommand
in interface Visitor
visitReplaceCommand
in class DDAsyncInterceptor
Throwable
public Object visitComputeCommand(InvocationContext ctx, ComputeCommand command) throws Throwable
visitComputeCommand
in interface Visitor
visitComputeCommand
in class DDAsyncInterceptor
Throwable
public Object visitComputeIfAbsentCommand(InvocationContext ctx, ComputeIfAbsentCommand command) throws Throwable
visitComputeIfAbsentCommand
in interface Visitor
visitComputeIfAbsentCommand
in class DDAsyncInterceptor
Throwable
public Object visitReadWriteKeyValueCommand(InvocationContext ctx, ReadWriteKeyValueCommand command) throws Throwable
visitReadWriteKeyValueCommand
in interface Visitor
visitReadWriteKeyValueCommand
in class DDAsyncInterceptor
Throwable
public Object visitReadWriteKeyCommand(InvocationContext ctx, ReadWriteKeyCommand command) throws Throwable
visitReadWriteKeyCommand
in interface Visitor
visitReadWriteKeyCommand
in class DDAsyncInterceptor
Throwable
public Object visitWriteOnlyKeyValueCommand(InvocationContext ctx, WriteOnlyKeyValueCommand command) throws Throwable
visitWriteOnlyKeyValueCommand
in interface Visitor
visitWriteOnlyKeyValueCommand
in class DDAsyncInterceptor
Throwable
public Object visitWriteOnlyKeyCommand(InvocationContext ctx, WriteOnlyKeyCommand command) throws Throwable
visitWriteOnlyKeyCommand
in interface Visitor
visitWriteOnlyKeyCommand
in class DDAsyncInterceptor
Throwable
public Object visitPutMapCommand(InvocationContext ctx, PutMapCommand command) throws Throwable
visitPutMapCommand
in interface Visitor
visitPutMapCommand
in class DDAsyncInterceptor
Throwable
public Object visitWriteOnlyManyEntriesCommand(InvocationContext ctx, WriteOnlyManyEntriesCommand command)
visitWriteOnlyManyEntriesCommand
in interface Visitor
visitWriteOnlyManyEntriesCommand
in class DDAsyncInterceptor
public Object visitWriteOnlyManyCommand(InvocationContext ctx, WriteOnlyManyCommand command)
visitWriteOnlyManyCommand
in interface Visitor
visitWriteOnlyManyCommand
in class DDAsyncInterceptor
public Object visitReadWriteManyCommand(InvocationContext ctx, ReadWriteManyCommand command) throws Throwable
visitReadWriteManyCommand
in interface Visitor
visitReadWriteManyCommand
in class DDAsyncInterceptor
Throwable
public Object visitReadWriteManyEntriesCommand(InvocationContext ctx, ReadWriteManyEntriesCommand command) throws Throwable
visitReadWriteManyEntriesCommand
in interface Visitor
visitReadWriteManyEntriesCommand
in class DDAsyncInterceptor
Throwable
Copyright © 2021 JBoss by Red Hat. All rights reserved.