public abstract class AbstractDataWriteCommand extends AbstractDataCommand implements DataWriteCommand, RemoteLockCommand
Modifier and Type | Field and Description |
---|---|
protected CommandInvocationId |
commandInvocationId |
key, segment
Modifier | Constructor and Description |
---|---|
protected |
AbstractDataWriteCommand() |
protected |
AbstractDataWriteCommand(Object key,
int segment,
long flagsBitSet,
CommandInvocationId commandInvocationId) |
Modifier and Type | Method and Description |
---|---|
Collection<?> |
getAffectedKeys() |
CommandInvocationId |
getCommandInvocationId() |
Object |
getKeyLockOwner()
It returns the lock owner of the key.
|
Collection<?> |
getKeysToLock()
It returns a
Collection with the keys to be lock. |
boolean |
hasSkipLocking()
It checks if this command should acquire locks.
|
boolean |
hasZeroLockAcquisition() |
boolean |
isReturnValueExpected()
If true, a return value will be provided when performed remotely.
|
equals, getFlagsBitSet, getKey, getSegment, getTopologyId, hashCode, printFlags, setFlagsBitSet, setKey, setTopologyId, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getInternalMetadata, getInternalMetadata, setInternalMetadata, setInternalMetadata
fail, getValueMatcher, isConditional, isSuccessful, isWriteOnly, setValueMatcher, updateStatusFromRemoteResponse
getKey
getTopologyId, setTopologyId
addFlag, addFlags, addFlags, getFlags, getFlagsBitSet, hasAllFlags, hasAnyFlag, hasFlag, setFlags, setFlagsBitSet
extractSegment, getSegment
protected CommandInvocationId commandInvocationId
protected AbstractDataWriteCommand()
protected AbstractDataWriteCommand(Object key, int segment, long flagsBitSet, CommandInvocationId commandInvocationId)
public Collection<?> getAffectedKeys()
getAffectedKeys
in interface WriteCommand
public boolean isReturnValueExpected()
ReplicableCommand
ResponseGenerator
may choose to simply return null to save on marshalling
costs.isReturnValueExpected
in interface ReplicableCommand
isReturnValueExpected
in class AbstractDataCommand
public Collection<?> getKeysToLock()
RemoteLockCommand
Collection
with the keys to be lock.
It may return an empty collection if no keys needs to be locked independently of the return value of RemoteLockCommand.hasSkipLocking()
. It may contains duplicated keys and null
is not a valid return value.
getKeysToLock
in interface RemoteLockCommand
Collection
of keys to lock.public final Object getKeyLockOwner()
RemoteLockCommand
Usually, in transaction caches it is the GlobalTransaction
and in
non-transactional caches the CommandInvocationId
.
getKeyLockOwner
in interface RemoteLockCommand
public final boolean hasZeroLockAcquisition()
hasZeroLockAcquisition
in interface RemoteLockCommand
public final boolean hasSkipLocking()
RemoteLockCommand
hasSkipLocking
in interface RemoteLockCommand
true
if locks should be acquired for the keys in RemoteLockCommand.getKeysToLock()
.public CommandInvocationId getCommandInvocationId()
getCommandInvocationId
in interface WriteCommand
CommandInvocationId
associated to the command.Copyright © 2021 JBoss by Red Hat. All rights reserved.