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, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetInternalMetadata, getInternalMetadata, setInternalMetadata, setInternalMetadatafail, getValueMatcher, isConditional, isSuccessful, isWriteOnly, setValueMatcher, updateStatusFromRemoteResponsegetKeygetTopologyId, setTopologyIdaddFlag, addFlags, addFlags, getFlags, getFlagsBitSet, hasAllFlags, hasAnyFlag, hasFlag, setFlags, setFlagsBitSetextractSegment, getSegmentprotected CommandInvocationId commandInvocationId
protected AbstractDataWriteCommand()
protected AbstractDataWriteCommand(Object key, int segment, long flagsBitSet, CommandInvocationId commandInvocationId)
public Collection<?> getAffectedKeys()
getAffectedKeys in interface WriteCommandpublic boolean isReturnValueExpected()
ReplicableCommandResponseGenerator may choose to simply return null to save on marshalling
costs.isReturnValueExpected in interface ReplicableCommandisReturnValueExpected in class AbstractDataCommandpublic Collection<?> getKeysToLock()
RemoteLockCommandCollection 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 RemoteLockCommandCollection 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 RemoteLockCommandpublic final boolean hasZeroLockAcquisition()
hasZeroLockAcquisition in interface RemoteLockCommandpublic final boolean hasSkipLocking()
RemoteLockCommandhasSkipLocking in interface RemoteLockCommandtrue if locks should be acquired for the keys in RemoteLockCommand.getKeysToLock().public CommandInvocationId getCommandInvocationId()
getCommandInvocationId in interface WriteCommandCommandInvocationId associated to the command.Copyright © 2022 JBoss by Red Hat. All rights reserved.