Class WriteOnlyManyCommand<K,V>

java.lang.Object
org.infinispan.commands.functional.AbstractWriteManyCommand<K,V>
org.infinispan.commands.functional.WriteOnlyManyCommand<K,V>
All Implemented Interfaces:
FlagAffectedCommand, FunctionalCommand<K,V>, CacheRpcCommand, ReplicableCommand, TopologyAffectedCommand, TracedCommand, VisitableCommand, WriteCommand, VersionAware, RemoteLockCommand

@ProtoTypeId(1251) public final class WriteOnlyManyCommand<K,V> extends AbstractWriteManyCommand<K,V>
  • Constructor Details

  • Method Details

    • init

      public void init(ComponentRegistry componentRegistry)
      Specified by:
      init in interface VisitableCommand
      Overrides:
      init in class AbstractWriteManyCommand<K,V>
    • getConsumer

      public Consumer<EntryView.WriteEntryView<K,V>> getConsumer()
    • setKeys

      public void setKeys(Collection<?> keys)
    • withKeys

      public final WriteOnlyManyCommand<K,V> withKeys(Collection<?> keys)
    • acceptVisitor

      public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
      Description copied from interface: VisitableCommand
      Accept a visitor, and return the result of accepting this visitor.
      Parameters:
      ctx - invocation context
      visitor - visitor to accept
      Returns:
      arbitrary return value
      Throws:
      Throwable - in the event of problems
    • getAffectedKeys

      public Collection<?> 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

      public VisitableCommand.LoadType loadType()
      Returns:
      Nodes on which the command needs to read the previous values of the keys it acts on.
    • isWriteOnly

      public boolean isWriteOnly()
      Description copied from interface: WriteCommand
      Indicates whether the command is write-only, meaning that it makes no attempt to read the previously associated value with key for which the command is directed.
      Returns:
      true is the command is write only, false otherwise.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getKeysToLock

      public Collection<?> getKeysToLock()
      Description copied from interface: RemoteLockCommand
      It returns a 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.

      Returns:
      a Collection of keys to lock.
    • toMutation

      public Mutation<K,V,?> toMutation(Object key)
    • supportedSince

      public NodeVersion supportedSince()
      Description copied from interface: ReplicableCommand
      Returns a NodeVersion representing 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 ReplicableCommand should always override this method.

      Returns:
      a NodeVersion corresponding to the Infinispan version this command was added.