public abstract class ClusteringInterceptor extends BaseRpcInterceptor
Modifier and Type | Field and Description |
---|---|
protected CommandsFactory |
cf |
protected DataContainer |
dataContainer |
protected EntryFactory |
entryFactory |
protected LockManager |
lockManager |
protected boolean |
needReliableReturnValues |
protected StateTransferManager |
stateTransferManager |
defaultSynchronous, rpcManager
cacheConfiguration
Constructor and Description |
---|
ClusteringInterceptor() |
Modifier and Type | Method and Description |
---|---|
void |
configure() |
protected boolean |
ignorePreviousValueOnBackup(WriteCommand command,
InvocationContext ctx)
For conditional operations (replace, remove, put if absent) Used only for optimistic transactional caches, to solve the following situation:
|
void |
injectDependencies(CommandsFactory cf,
EntryFactory entryFactory,
LockManager lockManager,
DataContainer dataContainer,
StateTransferManager stateTransferManager) |
protected boolean |
isNeedReliableReturnValues(FlagAffectedCommand command) |
protected boolean |
needsRemoteGet(InvocationContext ctx,
AbstractDataCommand command) |
protected abstract InternalCacheEntry |
retrieveFromRemoteSource(Object key,
InvocationContext ctx,
boolean acquireRemoteLock,
FlagAffectedCommand command)
Retrieves a cache entry from a remote source.
|
init, inject, isLocalModeForced, isSyncCommitPhase, isSynchronous, shouldInvokeRemoteTxCommand, transactionRemotelyPrepared
getLockAcquisitionTimeout, getLog, getNext, handleDefault, hasNext, hasSkipLocking, injectConfiguration, invokeNextInterceptor, setNext
visitApplyDeltaCommand, visitClearCommand, visitCollection, visitCommitCommand, visitDistributedExecuteCommand, visitEntrySetCommand, visitEvictCommand, visitGetKeyValueCommand, visitInvalidateCommand, visitInvalidateL1Command, visitKeySetCommand, visitLockControlCommand, visitPrepareCommand, visitPutKeyValueCommand, visitPutMapCommand, visitRemoveCommand, visitReplaceCommand, visitRollbackCommand, visitSizeCommand, visitUnknownCommand, visitValuesCommand
protected CommandsFactory cf
protected EntryFactory entryFactory
protected LockManager lockManager
protected DataContainer dataContainer
protected StateTransferManager stateTransferManager
protected boolean needReliableReturnValues
public void injectDependencies(CommandsFactory cf, EntryFactory entryFactory, LockManager lockManager, DataContainer dataContainer, StateTransferManager stateTransferManager)
public void configure()
protected boolean isNeedReliableReturnValues(FlagAffectedCommand command)
protected boolean needsRemoteGet(InvocationContext ctx, AbstractDataCommand command)
protected boolean ignorePreviousValueOnBackup(WriteCommand command, InvocationContext ctx)
- node A (owner, tx originator) does a successful replace - the actual value changes - tx commits. The value is applied on A (the check was performed at operation time) but is not applied on B (check is performed at commit time). In such situations (optimistic caches) the remote conditional command should not re-check the old value.
protected abstract InternalCacheEntry retrieveFromRemoteSource(Object key, InvocationContext ctx, boolean acquireRemoteLock, FlagAffectedCommand command) throws Exception
ClusteredGetCommand
and some form of quorum of responses if the responses returned are inconsistent - often the case if there is a
rehash in progress, involving nodes that the key maps to.key
- key to look upException
Copyright © 2017 JBoss, a division of Red Hat. All Rights Reserved.