public final class ReadWriteKeyCommand<K,V,R> extends AbstractWriteKeyCommand<K,V>
Modifier and Type | Field and Description |
---|---|
static byte |
COMMAND_ID |
commandInvocationId
key, segment
Constructor and Description |
---|
ReadWriteKeyCommand() |
ReadWriteKeyCommand(Object key,
Function<EntryView.ReadWriteEntryView<K,V>,R> f,
int segment,
CommandInvocationId id,
ValueMatcher valueMatcher,
Params params,
DataConversion keyDataConversion,
DataConversion valueDataConversion) |
Modifier and Type | Method and Description |
---|---|
Object |
acceptVisitor(InvocationContext ctx,
Visitor visitor)
Accept a visitor, and return the result of accepting this visitor.
|
byte |
getCommandId()
Used by marshallers to convert this command into an id for streaming.
|
Function<EntryView.ReadWriteEntryView<K,V>,R> |
getFunction() |
void |
init(ComponentRegistry componentRegistry) |
boolean |
isConditional()
Certain commands only work based on a certain condition or state of the cache.
|
VisitableCommand.LoadType |
loadType() |
void |
readFrom(ObjectInput input)
Reads this instance from the stream written by
ReplicableCommand.writeTo(ObjectOutput) . |
Mutation<K,V,?> |
toMutation(Object key) |
String |
toString() |
void |
writeTo(ObjectOutput output)
Writes this instance to the
ObjectOutput . |
fail, getInternalMetadata, getKeyDataConversion, getParams, getValueDataConversion, getValueMatcher, isSuccessful, setInternalMetadata, setValueMatcher
getAffectedKeys, getCommandInvocationId, getKeyLockOwner, getKeysToLock, hasSkipLocking, hasZeroLockAcquisition, isReturnValueExpected
equals, getFlagsBitSet, getKey, getSegment, getTopologyId, hashCode, printFlags, setFlagsBitSet, setKey, setTopologyId
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getInternalMetadata, setInternalMetadata
isWriteOnly, updateStatusFromRemoteResponse
getKey
getTopologyId, setTopologyId
addFlag, addFlags, addFlags, getFlags, getFlagsBitSet, hasAllFlags, hasAnyFlag, hasFlag, setFlags, setFlagsBitSet
extractSegment, getSegment
public static final byte COMMAND_ID
public ReadWriteKeyCommand(Object key, Function<EntryView.ReadWriteEntryView<K,V>,R> f, int segment, CommandInvocationId id, ValueMatcher valueMatcher, Params params, DataConversion keyDataConversion, DataConversion valueDataConversion)
public ReadWriteKeyCommand()
public void init(ComponentRegistry componentRegistry)
init
in interface VisitableCommand
init
in class AbstractWriteKeyCommand<K,V>
public byte getCommandId()
ReplicableCommand
public void writeTo(ObjectOutput output) throws IOException
ReplicableCommand
ObjectOutput
.output
- the stream.IOException
- if an error occurred during the I/O.public void readFrom(ObjectInput input) throws IOException, ClassNotFoundException
ReplicableCommand
ReplicableCommand.writeTo(ObjectOutput)
.input
- the stream to read.IOException
- if an error occurred during the I/O.ClassNotFoundException
- if it tries to load an undefined class.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.public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
VisitableCommand
ctx
- invocation contextvisitor
- visitor to acceptThrowable
- in the event of problemspublic VisitableCommand.LoadType loadType()
public Function<EntryView.ReadWriteEntryView<K,V>,R> getFunction()
public String toString()
toString
in class AbstractWriteKeyCommand<K,V>
Copyright © 2021 JBoss by Red Hat. All rights reserved.