public abstract class AbstractWriteManyCommand<K,V> extends Object implements WriteCommand, ParamsCommand
Constructor and Description |
---|
AbstractWriteManyCommand() |
Modifier and Type | Method and Description |
---|---|
Set<Flag> |
getFlags() |
Metadata |
getMetadata()
Get metadata of this command.
|
Params |
getParams() |
int |
getTopologyId() |
ValueMatcher |
getValueMatcher() |
boolean |
hasFlag(Flag flag)
Check whether a particular flag is present in the command
|
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 |
setFlags(Flag... flags)
Add some flags to the command.
|
void |
setFlags(Set<Flag> flags)
Set the flags, replacing any existing flags.
|
void |
setForwarded(boolean forwarded) |
void |
setMetadata(Metadata metadata)
Sets metadata for this command.
|
void |
setParams(Params params) |
void |
setTopologyId(int topologyId) |
void |
setValueMatcher(ValueMatcher valueMatcher) |
boolean |
shouldInvoke(InvocationContext ctx)
Used by the InboundInvocationHandler to determine whether the command should be invoked or not.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAffectedKeys, isWriteOnly, updateStatusFromRemoteResponse
acceptVisitor, alwaysReadsExistingValues, ignoreCommandOnStatus, readsExistingValues
canBlock, getCommandId, getParameters, isReturnValueExpected, perform, readFrom, setParameters, writeTo
addFlag, addFlags
public int getTopologyId()
getTopologyId
in interface TopologyAffectedCommand
public void setTopologyId(int topologyId)
setTopologyId
in interface TopologyAffectedCommand
public boolean isForwarded()
public void setForwarded(boolean forwarded)
public ValueMatcher getValueMatcher()
getValueMatcher
in interface WriteCommand
public void setValueMatcher(ValueMatcher valueMatcher)
setValueMatcher
in interface WriteCommand
valueMatcher
- The new value matching policy.public boolean isSuccessful()
WriteCommand
isSuccessful
in interface WriteCommand
public boolean isConditional()
WriteCommand
ConcurrentMap.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 WriteCommand
public boolean shouldInvoke(InvocationContext ctx)
VisitableCommand
shouldInvoke
in interface VisitableCommand
public Set<Flag> getFlags()
getFlags
in interface LocalFlagAffectedCommand
LocalFlagAffectedCommand.setFlags(java.util.Set)
. The set should
not be modified directly, only via the LocalFlagAffectedCommand.setFlags(Set)
, LocalFlagAffectedCommand.addFlag(Flag)
and LocalFlagAffectedCommand.addFlags(Set)
methods.public Metadata getMetadata()
MetadataAwareCommand
getMetadata
in interface MetadataAwareCommand
public void setMetadata(Metadata metadata)
MetadataAwareCommand
setMetadata
in interface MetadataAwareCommand
public void setFlags(Set<Flag> flags)
LocalFlagAffectedCommand
setFlags
in interface LocalFlagAffectedCommand
flags
- The new flags.public void setFlags(Flag... flags)
LocalFlagAffectedCommand
setFlags
in interface LocalFlagAffectedCommand
flags
- The flags to add.public boolean hasFlag(Flag flag)
LocalFlagAffectedCommand
hasFlag
in interface LocalFlagAffectedCommand
flag
- to lookup in the commandpublic Params getParams()
getParams
in interface ParamsCommand
public void setParams(Params params)
Copyright © 2020 JBoss, a division of Red Hat. All rights reserved.