Interface FlagAffectedCommand

All Superinterfaces:
ReplicableCommand, VisitableCommand
All Known Subinterfaces:
DataCommand
All Known Implementing Classes:
org.infinispan.commands.read.AbstractDataCommand, AbstractFlagAffectedCommand, AbstractTopologyAffectedCommand, TouchCommand

public interface FlagAffectedCommand extends VisitableCommand
Flags modify behavior of command such as whether or not to invoke certain commands remotely, check cache store etc.
Since:
5.0
Author:
William Burns, Sanne Grinovero
  • Method Details

    • getFlags

      default Set<Flag> getFlags()
      Returns:
      The command flags - only valid to invoke after setFlags(java.util.Set). The set should not be modified directly, only via the setFlags(Set), addFlag(Flag) and addFlags(Set) methods.
    • getFlagsBitSet

      long getFlagsBitSet()
      Returns:
      The command flags. Flags can be modified with setFlagsBitSet(long), addFlags(long) and addFlags(Set) methods.
    • setFlags

      default void setFlags(Set<Flag> flags)
      Deprecated.
      Since 9.0, please use setFlagsBitSet(long) instead.
      Set the flags, replacing any existing flags.
      Parameters:
      flags - The new flags.
    • setFlagsBitSet

      void setFlagsBitSet(long bitSet)
      Set the flags, replacing any existing flags.
    • addFlag

      @Deprecated(forRemoval=true) default void addFlag(Flag flag)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 9.0, please use addFlags(long) with a FlagBitSets constant instead.
      Add a single flag to the command.
      Parameters:
      flag - The flag to add.
    • addFlags

      @Deprecated(forRemoval=true) default void addFlags(Set<Flag> flags)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 9.0, please use addFlags(long) with a FlagBitSets constant instead.
      Add a set of flags to the command.
      Parameters:
      flags - The flags to add.
    • addFlags

      default void addFlags(long flagsBitSet)
      Add a set of flags to the command.
      Parameters:
      flagsBitSet - The flags to add, usually a FlagBitSets constant (or combination thereof).
    • hasFlag

      @Deprecated(forRemoval=true) default boolean hasFlag(Flag flag)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 9.0, please use hasAnyFlag(long) with a FlagBitSets constant instead.
      Check whether a particular flag is present in the command.
      Parameters:
      flag - to lookup in the command
      Returns:
      true if the flag is present
    • hasAnyFlag

      default boolean hasAnyFlag(long flagsBitSet)
      Check whether any of the flags in the flagsBitSet parameter is present in the command. Should be used with the constants in FlagBitSets.
    • hasAllFlags

      default boolean hasAllFlags(long flagBitSet)
      Check whether all of the flags in the flagsBitSet parameter are present in the command. Should be used with the constants in FlagBitSets.