Package org.infinispan.commands.read
Class AbstractDataCommand
- java.lang.Object
-
- org.infinispan.commands.read.AbstractDataCommand
-
- All Implemented Interfaces:
DataCommand,FlagAffectedCommand,ReplicableCommand,SegmentSpecificCommand,TopologyAffectedCommand,VisitableCommand
- Direct Known Subclasses:
AbstractDataWriteCommand,GetCacheEntryCommand,GetKeyValueCommand,ReadOnlyKeyCommand
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
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractDataCommand()protectedAbstractDataCommand(Object key, int segment, long flagsBitSet)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)longgetFlagsBitSet()ObjectgetKey()intgetSegment()Returns the segment that this key maps to.intgetTopologyId()inthashCode()booleanisReturnValueExpected()If true, a return value will be provided when performed remotely.protected StringprintFlags()voidsetFlagsBitSet(long bitSet)Set the flags, replacing any existing flags.voidsetKey(Object key)voidsetTopologyId(int topologyId)StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.infinispan.commands.FlagAffectedCommand
addFlag, addFlags, addFlags, getFlags, hasAllFlags, hasAnyFlag, hasFlag, setFlags
-
Methods inherited from interface org.infinispan.commands.ReplicableCommand
canBlock, getCommandId, invoke, invokeAsync, isSuccessful, readFrom, setOrigin, writeTo
-
Methods inherited from interface org.infinispan.commands.VisitableCommand
acceptVisitor, init, loadType
-
-
-
-
Field Detail
-
key
protected Object key
-
segment
protected int segment
-
-
Constructor Detail
-
AbstractDataCommand
protected AbstractDataCommand(Object key, int segment, long flagsBitSet)
-
AbstractDataCommand
protected AbstractDataCommand()
-
-
Method Detail
-
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(Set)methods.
-
setFlagsBitSet
public void setFlagsBitSet(long bitSet)
Description copied from interface:FlagAffectedCommandSet the flags, replacing any existing flags.- Specified by:
setFlagsBitSetin interfaceFlagAffectedCommand
-
getKey
public Object getKey()
- Specified by:
getKeyin interfaceDataCommand
-
setKey
public void setKey(Object key)
-
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
protected final String printFlags()
-
-