Package org.infinispan.commands
Interface FlagAffectedCommand
- All Superinterfaces:
ReplicableCommand
,VisitableCommand
- All Known Subinterfaces:
DataCommand
- All Known Implementing Classes:
org.infinispan.commands.read.AbstractDataCommand
,AbstractFlagAffectedCommand
,AbstractTopologyAffectedCommand
,TouchCommand
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
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.infinispan.commands.VisitableCommand
VisitableCommand.LoadType
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
Deprecated, for removal: This API element is subject to removal in a future version.default void
addFlags
(long flagsBitSet) Add a set of flags to the command.default void
Deprecated, for removal: This API element is subject to removal in a future version.Since 9.0, please useaddFlags(long)
with aFlagBitSets
constant instead.getFlags()
long
default boolean
hasAllFlags
(long flagBitSet) Check whether all of the flags in theflagsBitSet
parameter are present in the command.default boolean
hasAnyFlag
(long flagsBitSet) Check whether any of the flags in theflagsBitSet
parameter is present in the command.default boolean
Deprecated, for removal: This API element is subject to removal in a future version.Since 9.0, please usehasAnyFlag(long)
with aFlagBitSets
constant instead.default void
Deprecated.Since 9.0, please usesetFlagsBitSet(long)
instead.void
setFlagsBitSet
(long bitSet) Set the flags, replacing any existing flags.Methods inherited from interface org.infinispan.commands.ReplicableCommand
canBlock, getCommandId, invoke, invokeAsync, isReturnValueExpected, isSuccessful, logThrowable, readFrom, setOrigin, writeTo
Methods inherited from interface org.infinispan.commands.VisitableCommand
acceptVisitor, init, loadType
-
Method Details
-
getFlags
- Returns:
- The command flags - only valid to invoke after
setFlags(java.util.Set)
. The set should not be modified directly, only via thesetFlags(Set)
,addFlag(Flag)
andaddFlags(Set)
methods.
-
getFlagsBitSet
long getFlagsBitSet()- Returns:
- The command flags. Flags can be modified with
setFlagsBitSet(long)
,addFlags(long)
andaddFlags(Set)
methods.
-
setFlags
Deprecated.Since 9.0, please usesetFlagsBitSet(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, for removal: This API element is subject to removal in a future version.Since 9.0, please useaddFlags(long)
with aFlagBitSets
constant instead.Add a single flag to the command.- Parameters:
flag
- The flag to add.
-
addFlags
Deprecated, for removal: This API element is subject to removal in a future version.Since 9.0, please useaddFlags(long)
with aFlagBitSets
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 aFlagBitSets
constant (or combination thereof).
-
hasFlag
Deprecated, for removal: This API element is subject to removal in a future version.Since 9.0, please usehasAnyFlag(long)
with aFlagBitSets
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 theflagsBitSet
parameter is present in the command. Should be used with the constants inFlagBitSets
. -
hasAllFlags
default boolean hasAllFlags(long flagBitSet) Check whether all of the flags in theflagsBitSet
parameter are present in the command. Should be used with the constants inFlagBitSets
.
-
addFlags(long)
with aFlagBitSets
constant instead.