Package org.infinispan.commands
Interface FlagAffectedCommand
- All Superinterfaces:
ReplicableCommand
,TracedCommand
,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
addFlags
(long flagsBitSet) Add a set of flags to the command.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.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.TracedCommand
getOperationName, getSpanAttributes, setSpanAttributes
Methods inherited from interface org.infinispan.commands.VisitableCommand
acceptVisitor, init, loadType
-
Method Details
-
getFlags
- Returns:
- The command flags - only valid to invoke after
setFlagsBitSet(long)
. The set should not be modified directly, only via thesetFlagsBitSet(long)
,addFlags(long)
andaddFlags(long)
methods.
-
getFlagsBitSet
long getFlagsBitSet()- Returns:
- The command flags. Flags can be modified with
setFlagsBitSet(long)
,addFlags(long)
andaddFlags(long)
methods.
-
setFlagsBitSet
void setFlagsBitSet(long bitSet) Set the flags, replacing any existing flags. -
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).
-
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
.
-