Class AbstractFlagAffectedCommand
java.lang.Object
org.infinispan.commands.AbstractFlagAffectedCommand
- All Implemented Interfaces:
FlagAffectedCommand
,org.infinispan.commands.remote.CacheRpcCommand
,ReplicableCommand
,TracedCommand
,VisitableCommand
,VersionAware
- Direct Known Subclasses:
AbstractTopologyAffectedCommand
public abstract class AbstractFlagAffectedCommand
extends Object
implements org.infinispan.commands.remote.CacheRpcCommand, FlagAffectedCommand
Base class for those commands that can carry flags.
- Since:
- 5.1
- Author:
- Galder Zamarreño
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.infinispan.commands.VisitableCommand
VisitableCommand.LoadType
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ByteString
protected long
protected Address
protected InfinispanSpanAttributes
Fields inherited from interface org.infinispan.commands.VisitableCommand
log
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractFlagAffectedCommand
(long flags) AbstractFlagAffectedCommand
(ByteString cacheName, long flags) -
Method Summary
Modifier and TypeMethodDescriptionlong
long
protected final boolean
hasSameFlags
(FlagAffectedCommand other) protected final String
void
setFlagsBitSet
(long bitSet) Set the flags, replacing any existing flags.void
Sets the sender'sAddress
.void
setSpanAttributes
(InfinispanSpanAttributes attributes) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.infinispan.commands.FlagAffectedCommand
addFlags, getFlags, hasAllFlags, hasAnyFlag
Methods inherited from interface org.infinispan.commands.ReplicableCommand
getCommandId, isReturnValueExpected, isSuccessful, logThrowable, readFrom, supportedSince, writeTo
Methods inherited from interface org.infinispan.commands.TracedCommand
getOperationName
Methods inherited from interface org.infinispan.commands.VisitableCommand
acceptVisitor, init, invokeAsync, loadType
-
Field Details
-
cacheName
-
origin
-
flags
protected long flags -
spanAttributes
-
-
Constructor Details
-
AbstractFlagAffectedCommand
protected AbstractFlagAffectedCommand(long flags) -
AbstractFlagAffectedCommand
-
-
Method Details
-
getCacheName
-
getFlagsWithoutRemote
@ProtoField(number=2, name="flags") public long getFlagsWithoutRemote() -
getFlagsBitSet
public long getFlagsBitSet()- Specified by:
getFlagsBitSet
in interfaceFlagAffectedCommand
- Returns:
- The command flags. Flags can be modified with
FlagAffectedCommand.setFlagsBitSet(long)
,FlagAffectedCommand.addFlags(long)
andFlagAffectedCommand.addFlags(long)
methods.
-
setFlagsBitSet
public void setFlagsBitSet(long bitSet) Description copied from interface:FlagAffectedCommand
Set the flags, replacing any existing flags.- Specified by:
setFlagsBitSet
in interfaceFlagAffectedCommand
-
hasSameFlags
-
printFlags
-
getOrigin
-
setOrigin
Description copied from interface:ReplicableCommand
Sets the sender'sAddress
.By default, it doesn't set anything. Implement this method if the sender's
Address
is needed.- Specified by:
setOrigin
in interfaceReplicableCommand
- Parameters:
origin
- the sender'sAddress
-
setSpanAttributes
- Specified by:
setSpanAttributes
in interfaceTracedCommand
-
getSpanAttributes
- Specified by:
getSpanAttributes
in interfaceTracedCommand
-