Class ReadWriteManyCommand<K,V,R>
java.lang.Object
org.infinispan.commands.functional.AbstractWriteManyCommand<K,V>
org.infinispan.commands.functional.ReadWriteManyCommand<K,V,R>
- All Implemented Interfaces:
FlagAffectedCommand, FunctionalCommand<K,V>, CacheRpcCommand, ReplicableCommand, TopologyAffectedCommand, TracedCommand, VisitableCommand, WriteCommand, VersionAware, RemoteLockCommand
@ProtoTypeId(1153)
public final class ReadWriteManyCommand<K,V,R>
extends AbstractWriteManyCommand<K,V>
-
Nested Class Summary
Nested classes/interfaces inherited from interface VisitableCommand
VisitableCommand.LoadType -
Field Summary
Fields inherited from interface VisitableCommand
log -
Constructor Summary
ConstructorsConstructorDescriptionReadWriteManyCommand(ReadWriteManyCommand command) ReadWriteManyCommand(ByteString cacheName, Collection<?> keys, Function<EntryView.ReadWriteEntryView<K, V>, R> f, Params params, CommandInvocationId commandInvocationId, DataConversion keyDataConversion, DataConversion valueDataConversion) -
Method Summary
Modifier and TypeMethodDescriptionacceptVisitor(InvocationContext ctx, Visitor visitor) Accept a visitor, and return the result of accepting this visitor.Collection<?> Collection<?> It returns aCollectionwith the keys to be lock.voidinit(ComponentRegistry componentRegistry) loadType()voidsetKeys(Collection<?> keys) Returns aNodeVersionrepresenting the Infinispan version in which this command was added.toMutation(Object key) toString()final ReadWriteManyCommand<K, V, R> withKeys(Collection<?> keys) Methods inherited from class AbstractWriteManyCommand
fail, getCacheName, getCommandInvocationId, getFlagsBitSet, getInternalMetadata, getKeyDataConversion, getKeyLockOwner, getOrigin, getParams, getTopologyId, getValueDataConversion, getValueMatcher, hasSkipLocking, hasZeroLockAcquisition, isConditional, isForwarded, isReturnValueExpected, isSuccessful, setFlagsBitSet, setForwarded, setInternalMetadata, setOrigin, setParams, setTopologyId, setValueMatcherMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface FlagAffectedCommand
addFlags, getFlags, hasAllFlags, hasAnyFlagMethods inherited from interface ReplicableCommand
getCommandId, logThrowable, readFrom, writeToMethods inherited from interface TracedCommand
getOperationName, getSpanAttributes, setSpanAttributesMethods inherited from interface VisitableCommand
invokeAsyncMethods inherited from interface WriteCommand
isWriteOnly, shouldReplicate
-
Constructor Details
-
ReadWriteManyCommand
public ReadWriteManyCommand(ByteString cacheName, Collection<?> keys, Function<EntryView.ReadWriteEntryView<K, V>, R> f, Params params, CommandInvocationId commandInvocationId, DataConversion keyDataConversion, DataConversion valueDataConversion) -
ReadWriteManyCommand
-
-
Method Details
-
init
- Specified by:
initin interfaceVisitableCommand- Overrides:
initin classAbstractWriteManyCommand<K,V>
-
getFunction
-
setKeys
-
withKeys
-
acceptVisitor
Description copied from interface:VisitableCommandAccept a visitor, and return the result of accepting this visitor.- Parameters:
ctx- invocation contextvisitor- visitor to accept- Returns:
- arbitrary return value
- Throws:
Throwable- in the event of problems
-
getAffectedKeys
- Returns:
- a collection of keys affected by this write command. Some commands - such as ClearCommand - may return an empty collection for this method.
-
loadType
- Returns:
- Nodes on which the command needs to read the previous values of the keys it acts on.
-
supportedSince
Description copied from interface:ReplicableCommandReturns aNodeVersionrepresenting the Infinispan version in which this command was added. This value is used to ensure that when the cluster contains different Infinispan versions, only commands compatible with the oldest version are transmitted.Abstract classes should not implement this method as the version should be specific to an individual implementation. Similarly, implementations which extend another
ReplicableCommandshould always override this method.- Returns:
- a
NodeVersioncorresponding to the Infinispan version this command was added.
-
toString
-
getKeysToLock
Description copied from interface:RemoteLockCommandIt returns aCollectionwith 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 andnullis not a valid return value.- Returns:
- a
Collectionof keys to lock.
-
toMutation
-