public abstract class AbstractWriteManyCommand<K,V> extends Object implements WriteCommand, FunctionalCommand<K,V>, RemoteLockCommand
VisitableCommand.LoadType| Modifier | Constructor and Description |
|---|---|
protected |
AbstractWriteManyCommand() |
protected |
AbstractWriteManyCommand(AbstractWriteManyCommand<K,V> command) |
protected |
AbstractWriteManyCommand(CommandInvocationId commandInvocationId,
Params params,
DataConversion keyDataConversion,
DataConversion valueDataConversion) |
| Modifier and Type | Method and Description |
|---|---|
void |
fail()
Make subsequent invocations of
WriteCommand.isSuccessful() return false. |
CommandInvocationId |
getCommandInvocationId() |
long |
getFlagsBitSet() |
PrivateMetadata |
getInternalMetadata(Object key) |
DataConversion |
getKeyDataConversion() |
Object |
getKeyLockOwner()
It returns the lock owner of the key.
|
Params |
getParams() |
int |
getTopologyId() |
DataConversion |
getValueDataConversion() |
ValueMatcher |
getValueMatcher() |
boolean |
hasSkipLocking()
It checks if this command should acquire locks.
|
boolean |
hasZeroLockAcquisition() |
void |
init(ComponentRegistry componentRegistry) |
boolean |
isConditional()
Certain commands only work based on a certain condition or state of the cache.
|
boolean |
isForwarded() |
boolean |
isSuccessful()
Some commands may want to provide information on whether the command was successful or not.
|
void |
setFlagsBitSet(long bitSet)
Set the flags, replacing any existing flags.
|
void |
setForwarded(boolean forwarded) |
void |
setInternalMetadata(Object key,
PrivateMetadata internalMetadata) |
void |
setParams(Params params) |
void |
setTopologyId(int topologyId) |
void |
setValueMatcher(ValueMatcher valueMatcher) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAffectedKeys, isWriteOnly, updateStatusFromRemoteResponseaddFlag, addFlags, addFlags, getFlags, hasAllFlags, hasAnyFlag, hasFlag, setFlagsacceptVisitor, loadTypecanBlock, getCommandId, invoke, invokeAsync, isReturnValueExpected, readFrom, setOrigin, writeTotoMutationgetKeysToLockprotected AbstractWriteManyCommand(CommandInvocationId commandInvocationId, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
protected AbstractWriteManyCommand(AbstractWriteManyCommand<K,V> command)
protected AbstractWriteManyCommand()
public void init(ComponentRegistry componentRegistry)
init in interface VisitableCommandpublic int getTopologyId()
getTopologyId in interface TopologyAffectedCommandpublic void setTopologyId(int topologyId)
setTopologyId in interface TopologyAffectedCommandpublic boolean isForwarded()
public void setForwarded(boolean forwarded)
public ValueMatcher getValueMatcher()
getValueMatcher in interface WriteCommandpublic void setValueMatcher(ValueMatcher valueMatcher)
setValueMatcher in interface WriteCommandvalueMatcher - The new value matching policy.public boolean isSuccessful()
WriteCommandisSuccessful in interface ReplicableCommandisSuccessful in interface WriteCommandpublic boolean isConditional()
WriteCommandConcurrentMap.putIfAbsent(Object, Object) only does anything if a condition is met, i.e., the entry in
question is not already present. This method tests whether the command in question is conditional or not.isConditional in interface WriteCommandpublic void fail()
WriteCommandWriteCommand.isSuccessful() return false.fail in interface WriteCommandpublic long getFlagsBitSet()
getFlagsBitSet in interface FlagAffectedCommandFlagAffectedCommand.setFlagsBitSet(long), FlagAffectedCommand.addFlags(long)
and FlagAffectedCommand.addFlags(Set) methods.public void setFlagsBitSet(long bitSet)
FlagAffectedCommandsetFlagsBitSet in interface FlagAffectedCommandpublic Params getParams()
getParams in interface FunctionalCommand<K,V>public void setParams(Params params)
public Object getKeyLockOwner()
RemoteLockCommand
Usually, in transaction caches it is the GlobalTransaction and in
non-transactional caches the CommandInvocationId.
getKeyLockOwner in interface RemoteLockCommandpublic CommandInvocationId getCommandInvocationId()
getCommandInvocationId in interface WriteCommandCommandInvocationId associated to the command.public boolean hasZeroLockAcquisition()
hasZeroLockAcquisition in interface RemoteLockCommandpublic boolean hasSkipLocking()
RemoteLockCommandhasSkipLocking in interface RemoteLockCommandtrue if locks should be acquired for the keys in RemoteLockCommand.getKeysToLock().public DataConversion getKeyDataConversion()
getKeyDataConversion in interface FunctionalCommand<K,V>public DataConversion getValueDataConversion()
getValueDataConversion in interface FunctionalCommand<K,V>public PrivateMetadata getInternalMetadata(Object key)
getInternalMetadata in interface WriteCommandpublic void setInternalMetadata(Object key, PrivateMetadata internalMetadata)
setInternalMetadata in interface WriteCommandCopyright © 2021 JBoss by Red Hat. All rights reserved.