Class GridNearSingleGetRequest
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.GridCacheMessage
-
- org.apache.ignite.internal.processors.cache.GridCacheIdMessage
-
- org.apache.ignite.internal.processors.cache.distributed.near.GridNearSingleGetRequest
-
- All Implemented Interfaces:
Serializable,GridCacheDeployable,Message
public class GridNearSingleGetRequest extends GridCacheIdMessage implements GridCacheDeployable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intRECOVERY_FLAG_MASK-
Fields inherited from class org.apache.ignite.internal.processors.cache.GridCacheIdMessage
cacheId
-
Fields inherited from class org.apache.ignite.internal.processors.cache.GridCacheMessage
addDepInfo, CACHE_MSG_INDEX_FIELD_NAME, forceAddDepInfo, MAX_CACHE_MSG_LOOKUP_INDEX
-
Fields inherited from interface org.apache.ignite.plugin.extensions.communication.Message
DIRECT_TYPE_SIZE
-
-
Constructor Summary
Constructors Constructor Description GridNearSingleGetRequest()Empty constructor required forMessage.GridNearSingleGetRequest(int cacheId, long futId, KeyCacheObject key, boolean readThrough, @NotNull AffinityTopologyVersion topVer, int taskNameHash, long createTtl, long accessTtl, boolean skipVals, boolean addReader, boolean needVer, boolean addDepInfo, boolean recovery, @Nullable String txLbl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longaccessTtl()booleanaddDeploymentInfo()Deployment enabled flag indicates whether deployment info has to be added to this message.booleanaddReader()longcreateTtl()shortdirectType()Gets message type.bytefieldsCount()Gets fields count.voidfinishUnmarshal(GridCacheSharedContext<?,?> ctx, ClassLoader ldr)This method is called after the message is deserialized and is responsible for unmarshalling state marshalled inGridCacheMessage.prepareMarshal(GridCacheSharedContext)method.longfutureId()KeyCacheObjectkey()booleanneedEntryInfo()booleanneedVersion()intpartition()voidprepareMarshal(GridCacheSharedContext<?,?> ctx)This method is called before the whole message is serialized and is responsible for pre-marshalling state.booleanreadFrom(ByteBuffer buf, MessageReader reader)Reads this message from provided byte buffer.booleanreadThrough()booleanrecovery()booleanskipValues()inttaskNameHash()Gets task name hash.AffinityTopologyVersiontopologyVersion()Gets topology version or -1 in case of topology version is not required for this message.StringtoString()@Nullable StringtxLabel()Get transaction label (may be null).booleanwriteTo(ByteBuffer buf, MessageWriter writer)Writes this message to provided byte buffer.-
Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheIdMessage
cacheGroupMessage, cacheId, cacheId, handlerId
-
Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheMessage
appendFlag, classError, deployInfo, error, finishUnmarshalCacheObjects, finishUnmarshalCacheObjects, ignoreClassErrors, lastAffinityChangedTopologyVersion, lastAffinityChangedTopologyVersion, lookupIndex, marshalCollection, marshalInfo, marshalInfos, marshalInvokeArguments, marshalTx, messageId, messageLogger, nextIndexId, onAckReceived, onClassError, partitionExchangeMessage, prepare, prepareMarshalCacheObject, prepareMarshalCacheObjects, prepareMarshalCacheObjects, prepareObject, prepareObject, transferExpiryPolicy, unmarshalCollection, unmarshalInfo, unmarshalInfos, unmarshalInvokeArguments, unmarshalTx
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.ignite.internal.processors.cache.GridCacheDeployable
deployInfo, prepare
-
-
-
-
Field Detail
-
RECOVERY_FLAG_MASK
public static final int RECOVERY_FLAG_MASK
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GridNearSingleGetRequest
public GridNearSingleGetRequest()
Empty constructor required forMessage.
-
GridNearSingleGetRequest
public GridNearSingleGetRequest(int cacheId, long futId, KeyCacheObject key, boolean readThrough, @NotNull @NotNull AffinityTopologyVersion topVer, int taskNameHash, long createTtl, long accessTtl, boolean skipVals, boolean addReader, boolean needVer, boolean addDepInfo, boolean recovery, @Nullable @Nullable String txLbl)- Parameters:
cacheId- Cache ID.futId- Future ID.key- Key.readThrough- Read through flag.skipVals- Skip values flag. When false, only boolean values will be returned indicating whether cache entry has a value.topVer- Topology version.taskNameHash- Task name hash.createTtl- New TTL to set after entry is created, -1 to leave unchanged.accessTtl- New TTL to set after entry is accessed, -1 to leave unchanged.addReader- Add reader flag.needVer-Trueif entry version is needed.addDepInfo- Deployment info.txLbl- Transaction label.
-
-
Method Detail
-
key
public KeyCacheObject key()
- Returns:
- Key.
-
futureId
public long futureId()
- Returns:
- Future ID.
-
taskNameHash
public int taskNameHash()
Gets task name hash.- Returns:
- Task name hash.
-
topologyVersion
public AffinityTopologyVersion topologyVersion()
Description copied from class:GridCacheMessageGets topology version or -1 in case of topology version is not required for this message.- Overrides:
topologyVersionin classGridCacheMessage- Returns:
- Topology version.
-
createTtl
public long createTtl()
- Returns:
- New TTL to set after entry is created, -1 to leave unchanged.
-
accessTtl
public long accessTtl()
- Returns:
- New TTL to set after entry is accessed, -1 to leave unchanged.
-
partition
public int partition()
- Overrides:
partitionin classGridCacheMessage- Returns:
- Partition ID this message is targeted to or
-1if it cannot be determined.
-
txLabel
@Nullable public @Nullable String txLabel()
Get transaction label (may be null).- Returns:
- Transaction label;
-
readThrough
public boolean readThrough()
- Returns:
- Read through flag.
-
skipValues
public boolean skipValues()
- Returns:
- Read through flag.
-
addReader
public boolean addReader()
- Returns:
- Add reader flag.
-
needVersion
public boolean needVersion()
- Returns:
Trueif entry version is needed.
-
needEntryInfo
public boolean needEntryInfo()
- Returns:
Trueif full entry information is needed.
-
recovery
public boolean recovery()
- Returns:
Trueif recovery flag is set.
-
prepareMarshal
public void prepareMarshal(GridCacheSharedContext<?,?> ctx) throws IgniteCheckedException
This method is called before the whole message is serialized and is responsible for pre-marshalling state.- Overrides:
prepareMarshalin classGridCacheMessage- Parameters:
ctx- Cache context.- Throws:
IgniteCheckedException- If failed.
-
finishUnmarshal
public void finishUnmarshal(GridCacheSharedContext<?,?> ctx, ClassLoader ldr) throws IgniteCheckedException
This method is called after the message is deserialized and is responsible for unmarshalling state marshalled inGridCacheMessage.prepareMarshal(GridCacheSharedContext)method.- Overrides:
finishUnmarshalin classGridCacheMessage- Parameters:
ctx- Context.ldr- Class loader.- Throws:
IgniteCheckedException- If failed.
-
readFrom
public boolean readFrom(ByteBuffer buf, MessageReader reader)
Reads this message from provided byte buffer.- Specified by:
readFromin interfaceMessage- Overrides:
readFromin classGridCacheIdMessage- Parameters:
buf- Byte buffer.reader- Reader.- Returns:
- Whether message was fully read.
-
writeTo
public boolean writeTo(ByteBuffer buf, MessageWriter writer)
Writes this message to provided byte buffer.- Specified by:
writeToin interfaceMessage- Overrides:
writeToin classGridCacheIdMessage- Parameters:
buf- Byte buffer.writer- Writer.- Returns:
- Whether message was fully written.
-
addDeploymentInfo
public boolean addDeploymentInfo()
Deployment enabled flag indicates whether deployment info has to be added to this message.- Specified by:
addDeploymentInfoin classGridCacheMessage- Returns:
trueor if deployment info must be added to the the message,falseotherwise.
-
directType
public short directType()
Gets message type.- Specified by:
directTypein interfaceMessage- Returns:
- Message type.
-
fieldsCount
public byte fieldsCount()
Gets fields count.- Specified by:
fieldsCountin interfaceMessage- Overrides:
fieldsCountin classGridCacheIdMessage- Returns:
- Fields count.
-
toString
public String toString()
- Overrides:
toStringin classGridCacheIdMessage
-
-