public abstract class AbstractDataWriteCommand extends AbstractDataCommand implements DataWriteCommand, RemoteLockCommand
| Modifier and Type | Field and Description |
|---|---|
protected CommandInvocationId |
commandInvocationId |
keyflags| Modifier | Constructor and Description |
|---|---|
protected |
AbstractDataWriteCommand() |
protected |
AbstractDataWriteCommand(Object key,
Set<Flag> flags,
CommandInvocationId commandInvocationId) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canBlock()
If true, the command is processed asynchronously in a thread provided by an Infinispan thread pool.
|
Set<Object> |
getAffectedKeys() |
Object |
getKeyLockOwner()
It returns the lock owner of the key.
|
Collection<Object> |
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, getKey, hashCode, ignoreCommandOnStatus, setKey, shouldInvoke, toStringgetMetadata, getTopologyId, setMetadata, setTopologyIdgetFlags, setFlagsclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetValueMatcher, isConditional, isSuccessful, isWriteOnly, setValueMatcher, updateStatusFromRemoteResponseacceptVisitor, alwaysReadsExistingValues, ignoreCommandOnStatus, readsExistingValues, shouldInvokegetTopologyId, setTopologyIdgetCommandId, getParameters, perform, readFrom, setParameters, writeTogetMetadata, setMetadataaddFlag, addFlags, getFlags, hasFlag, setFlags, setFlagsgetKeyprotected CommandInvocationId commandInvocationId
protected AbstractDataWriteCommand()
protected AbstractDataWriteCommand(Object key, Set<Flag> flags, CommandInvocationId commandInvocationId)
public Set<Object> 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 boolean canBlock()
ReplicableCommandcanBlock in interface ReplicableCommandcanBlock in class AbstractDataCommandtrue if the command can block/wait, false otherwisepublic Collection<Object> 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().Copyright © 2025 JBoss, a division of Red Hat. All rights reserved.