public final class ReadWriteManyEntriesCommand<K,V,T,R> extends AbstractWriteManyCommand<K,V>
VisitableCommand.LoadType| Modifier and Type | Field and Description |
|---|---|
static byte |
COMMAND_ID |
| Constructor and Description |
|---|
ReadWriteManyEntriesCommand() |
ReadWriteManyEntriesCommand(Map<?,?> arguments,
BiFunction<T,EntryView.ReadWriteEntryView<K,V>,R> f,
Params params,
CommandInvocationId commandInvocationId,
DataConversion keyDataConversion,
DataConversion valueDataConversion) |
ReadWriteManyEntriesCommand(ReadWriteManyEntriesCommand 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() |
Map<?,?> |
getArguments() |
BiFunction<T,EntryView.ReadWriteEntryView<K,V>,R> |
getBiFunction() |
byte |
getCommandId()
Used by marshallers to convert this command into an id for streaming.
|
Collection<?> |
getKeysToLock()
It returns a
Collection with the keys to be lock. |
void |
init(ComponentRegistry componentRegistry) |
boolean |
isConditional()
Certain commands only work based on a certain condition or state of the cache.
|
boolean |
isForwarded() |
boolean |
isReturnValueExpected()
If true, a return value will be provided when performed remotely.
|
boolean |
isSuccessful()
Some commands may want to provide information on whether the command was successful or not.
|
VisitableCommand.LoadType |
loadType() |
void |
readFrom(ObjectInput input)
Reads this instance from the stream written by
ReplicableCommand.writeTo(ObjectOutput). |
void |
setArguments(Map<?,?> arguments) |
void |
setForwarded(boolean forwarded) |
Mutation<K,V,?> |
toMutation(Object key) |
String |
toString() |
ReadWriteManyEntriesCommand<K,V,T,R> |
withArguments(Map<?,?> entries) |
void |
writeTo(ObjectOutput output)
Writes this instance to the
ObjectOutput. |
fail, getCommandInvocationId, getFlagsBitSet, getInternalMetadata, getKeyDataConversion, getKeyLockOwner, getParams, getTopologyId, getValueDataConversion, getValueMatcher, hasSkipLocking, hasZeroLockAcquisition, setFlagsBitSet, setInternalMetadata, setParams, setTopologyId, setValueMatcherclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisWriteOnly, updateStatusFromRemoteResponseaddFlag, addFlags, addFlags, getFlags, hasAllFlags, hasAnyFlag, hasFlag, setFlagscanBlock, invoke, invokeAsync, setOriginpublic static final byte COMMAND_ID
public ReadWriteManyEntriesCommand(Map<?,?> arguments, BiFunction<T,EntryView.ReadWriteEntryView<K,V>,R> f, Params params, CommandInvocationId commandInvocationId, DataConversion keyDataConversion, DataConversion valueDataConversion)
public ReadWriteManyEntriesCommand(ReadWriteManyEntriesCommand command)
public ReadWriteManyEntriesCommand()
public void init(ComponentRegistry componentRegistry)
init in interface VisitableCommandinit in class AbstractWriteManyCommand<K,V>public BiFunction<T,EntryView.ReadWriteEntryView<K,V>,R> getBiFunction()
public Map<?,?> getArguments()
public void setArguments(Map<?,?> arguments)
public byte getCommandId()
ReplicableCommandpublic void writeTo(ObjectOutput output) throws IOException
ReplicableCommandObjectOutput.output - the stream.IOException - if an error occurred during the I/O.public void readFrom(ObjectInput input) throws IOException, ClassNotFoundException
ReplicableCommandReplicableCommand.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()
ReplicableCommandResponseGenerator may choose to simply return null to save on marshalling
costs.public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
VisitableCommandctx - invocation contextvisitor - visitor to acceptThrowable - in the event of problemspublic boolean isSuccessful()
WriteCommandisSuccessful in interface ReplicableCommandisSuccessful in interface WriteCommandisSuccessful in class AbstractWriteManyCommand<K,V>public 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 WriteCommandisConditional in class AbstractWriteManyCommand<K,V>public Collection<?> getAffectedKeys()
public VisitableCommand.LoadType loadType()
public Collection<?> 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.
Collection of keys to lock.Copyright © 2022 JBoss by Red Hat. All rights reserved.