Package org.infinispan.commands.read
Class AbstractDataCommand
java.lang.Object
org.infinispan.commands.read.AbstractDataCommand
- All Implemented Interfaces:
DataCommand,FlagAffectedCommand,ReplicableCommand,SegmentSpecificCommand,TopologyAffectedCommand,TracedCommand,VisitableCommand
- Direct Known Subclasses:
AbstractDataWriteCommand,GetCacheEntryCommand,GetKeyValueCommand,ReadOnlyKeyCommand,TouchCommand
public abstract class AbstractDataCommand
extends Object
implements DataCommand, SegmentSpecificCommand
- Since:
- 4.0
- Author:
- Mircea.Markus@jboss.com, Sanne Grinovero <sanne@hibernate.org> (C) 2011 Red Hat Inc.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.infinispan.commands.VisitableCommand
VisitableCommand.LoadType -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedAbstractDataCommand(Object key, int segment, long flagsBitSet) -
Method Summary
Modifier and TypeMethodDescriptionbooleanlonggetKey()intReturns the segment that this key maps to.intinthashCode()booleanIf true, a return value will be provided when performed remotely.protected final StringvoidsetFlagsBitSet(long bitSet) Set the flags, replacing any existing flags.voidvoidsetTopologyId(int topologyId) toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.infinispan.commands.FlagAffectedCommand
addFlags, getFlags, hasAllFlags, hasAnyFlagMethods inherited from interface org.infinispan.commands.ReplicableCommand
canBlock, getCommandId, invoke, invokeAsync, isSuccessful, logThrowable, readFrom, setOrigin, writeToMethods inherited from interface org.infinispan.commands.TracedCommand
getOperationName, getSpanAttributes, setSpanAttributesMethods inherited from interface org.infinispan.commands.VisitableCommand
acceptVisitor, init, loadType
-
Field Details
-
key
-
segment
protected int segment
-
-
Constructor Details
-
AbstractDataCommand
-
AbstractDataCommand
protected AbstractDataCommand()
-
-
Method Details
-
getSegment
public int getSegment()Description copied from interface:SegmentSpecificCommandReturns the segment that this key maps to. This must always return a number 0 or larger.- Specified by:
getSegmentin interfaceSegmentSpecificCommand- Returns:
- the segment of the key
-
getTopologyId
public int getTopologyId()- Specified by:
getTopologyIdin interfaceTopologyAffectedCommand
-
setTopologyId
public void setTopologyId(int topologyId) - Specified by:
setTopologyIdin interfaceTopologyAffectedCommand
-
getFlagsBitSet
public long getFlagsBitSet()- Specified by:
getFlagsBitSetin 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:FlagAffectedCommandSet the flags, replacing any existing flags.- Specified by:
setFlagsBitSetin interfaceFlagAffectedCommand
-
getKey
- Specified by:
getKeyin interfaceDataCommand
-
setKey
-
equals
-
hashCode
public int hashCode() -
toString
-
isReturnValueExpected
public boolean isReturnValueExpected()Description copied from interface:ReplicableCommandIf true, a return value will be provided when performed remotely. Otherwise, a remoteResponseGeneratormay choose to simply return null to save on marshalling costs.- Specified by:
isReturnValueExpectedin interfaceReplicableCommand- Returns:
- true or false
-
printFlags
-