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
,TouchCommand
public abstract class AbstractDataCommand
extends Object
implements DataCommand, SegmentSpecificCommand
- Since:
- 4.0
- Author:
- [email protected], Sanne Grinovero <[email protected]> (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
ConstructorsModifierConstructorDescriptionprotected
protected
AbstractDataCommand
(Object key, int segment, long flagsBitSet) -
Method Summary
Modifier and TypeMethodDescriptionboolean
long
getKey()
int
Returns the segment that this key maps to.int
int
hashCode()
boolean
If true, a return value will be provided when performed remotely.protected final String
void
setFlagsBitSet
(long bitSet) Set the flags, replacing any existing flags.void
void
setTopologyId
(int topologyId) toString()
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, logThrowable, readFrom, setOrigin, writeTo
Methods 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:SegmentSpecificCommand
Returns the segment that this key maps to. This must always return a number 0 or larger.- Specified by:
getSegment
in interfaceSegmentSpecificCommand
- Returns:
- the segment of the key
-
getTopologyId
public int getTopologyId()- Specified by:
getTopologyId
in interfaceTopologyAffectedCommand
-
setTopologyId
public void setTopologyId(int topologyId) - Specified by:
setTopologyId
in interfaceTopologyAffectedCommand
-
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(Set)
methods.
-
setFlagsBitSet
public void setFlagsBitSet(long bitSet) Description copied from interface:FlagAffectedCommand
Set the flags, replacing any existing flags.- Specified by:
setFlagsBitSet
in interfaceFlagAffectedCommand
-
getKey
- Specified by:
getKey
in interfaceDataCommand
-
setKey
-
equals
-
hashCode
public int hashCode() -
toString
-
isReturnValueExpected
public boolean isReturnValueExpected()Description copied from interface:ReplicableCommand
If true, a return value will be provided when performed remotely. Otherwise, a remoteResponseGenerator
may choose to simply return null to save on marshalling costs.- Specified by:
isReturnValueExpected
in interfaceReplicableCommand
- Returns:
- true or false
-
printFlags
-