public final class ReadWriteManyCommand<K,V,R> extends AbstractWriteManyCommand<K,V>
VisitableCommand.LoadType
Modifier and Type | Field and Description |
---|---|
static byte |
COMMAND_ID |
Constructor and Description |
---|
ReadWriteManyCommand() |
ReadWriteManyCommand(Collection<?> keys,
Function<EntryView.ReadWriteEntryView<K,V>,R> f,
Params params,
CommandInvocationId commandInvocationId,
DataConversion keyDataConversion,
DataConversion valueDataConversion) |
ReadWriteManyCommand(ReadWriteManyCommand command) |
Modifier and Type | Method and Description |
---|---|
Object |
acceptVisitor(InvocationContext ctx,
Visitor visitor)
Accept a visitor, and return the result of accepting this visitor.
|
Collection<?> |
getAffectedKeys() |
byte |
getCommandId()
Used by marshallers to convert this command into an id for streaming.
|
Function<EntryView.ReadWriteEntryView<K,V>,R> |
getFunction() |
Collection<?> |
getKeysToLock()
It returns a
Collection with the keys to be lock. |
void |
init(ComponentRegistry componentRegistry) |
boolean |
isForwarded() |
boolean |
isReturnValueExpected()
If true, a return value will be provided when performed remotely.
|
VisitableCommand.LoadType |
loadType() |
void |
readFrom(ObjectInput input)
Reads this instance from the stream written by
ReplicableCommand.writeTo(ObjectOutput) . |
void |
setForwarded(boolean forwarded) |
void |
setKeys(Collection<?> keys) |
Mutation |
toMutation(Object key) |
String |
toString() |
ReadWriteManyCommand<K,V,R> |
withKeys(Collection<?> keys) |
void |
writeTo(ObjectOutput output)
Writes this instance to the
ObjectOutput . |
fail, getCommandInvocationId, getFlagsBitSet, getInternalMetadata, getKeyDataConversion, getKeyLockOwner, getParams, getTopologyId, getValueDataConversion, getValueMatcher, hasSkipLocking, hasZeroLockAcquisition, isConditional, isSuccessful, setFlagsBitSet, setInternalMetadata, setParams, setTopologyId, setValueMatcher
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isWriteOnly, updateStatusFromRemoteResponse
addFlag, addFlags, addFlags, getFlags, hasAllFlags, hasAnyFlag, hasFlag, setFlags
canBlock, invoke, invokeAsync, setOrigin
public static final byte COMMAND_ID
public ReadWriteManyCommand(Collection<?> keys, Function<EntryView.ReadWriteEntryView<K,V>,R> f, Params params, CommandInvocationId commandInvocationId, DataConversion keyDataConversion, DataConversion valueDataConversion)
public ReadWriteManyCommand(ReadWriteManyCommand command)
public ReadWriteManyCommand()
public void init(ComponentRegistry componentRegistry)
init
in interface VisitableCommand
init
in class AbstractWriteManyCommand<K,V>
public Function<EntryView.ReadWriteEntryView<K,V>,R> getFunction()
public void setKeys(Collection<?> keys)
public final ReadWriteManyCommand<K,V,R> withKeys(Collection<?> keys)
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 isForwarded()
isForwarded
in class AbstractWriteManyCommand<K,V>
public void setForwarded(boolean forwarded)
setForwarded
in class AbstractWriteManyCommand<K,V>
public boolean isReturnValueExpected()
ReplicableCommand
ResponseGenerator
may choose to simply return null to save on marshalling
costs.public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
VisitableCommand
ctx
- invocation contextvisitor
- visitor to acceptThrowable
- in the event of problemspublic Collection<?> getAffectedKeys()
public VisitableCommand.LoadType loadType()
public Collection<?> getKeysToLock()
RemoteLockCommand
Collection
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.
Collection
of keys to lock.Copyright © 2021 JBoss by Red Hat. All rights reserved.