Class GridNearGetRequest
- 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.GridNearGetRequest
-
- All Implemented Interfaces:
Serializable,GridCacheDeployable,GridCacheVersionable,Message
public class GridNearGetRequest extends GridCacheIdMessage implements GridCacheDeployable, GridCacheVersionable
Get request. Responsible for obtaining entry from primary node. 'Near' means 'Initiating node' here, not 'Near Cache'.- 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 GridNearGetRequest()Empty constructor required forExternalizable.GridNearGetRequest(int cacheId, IgniteUuid futId, IgniteUuid miniId, GridCacheVersion ver, Map<KeyCacheObject,Boolean> keys, boolean readThrough, @NotNull AffinityTopologyVersion topVer, int taskNameHash, long createTtl, long accessTtl, boolean addReader, boolean skipVals, 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.booleanaddReaders()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.IgniteUuidfutureId()LinkedHashMap<KeyCacheObject,Boolean>keys()IgniteUuidminiId()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).GridCacheVersionversion()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
-
GridNearGetRequest
public GridNearGetRequest()
Empty constructor required forExternalizable.
-
GridNearGetRequest
public GridNearGetRequest(int cacheId, IgniteUuid futId, IgniteUuid miniId, GridCacheVersion ver, Map<KeyCacheObject,Boolean> keys, boolean readThrough, @NotNull @NotNull AffinityTopologyVersion topVer, int taskNameHash, long createTtl, long accessTtl, boolean addReader, boolean skipVals, boolean addDepInfo, boolean recovery, @Nullable @Nullable String txLbl)- Parameters:
cacheId- Cache ID.futId- Future ID.miniId- Sub ID.ver- Version.keys- Keys.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.addDepInfo- Deployment info.txLbl- Transaction label.
-
-
Method Detail
-
futureId
public IgniteUuid futureId()
- Returns:
- Future ID.
-
miniId
public IgniteUuid miniId()
- Returns:
- Sub ID.
-
taskNameHash
public int taskNameHash()
Gets task name hash.- Returns:
- Task name hash.
-
version
public GridCacheVersion version()
- Specified by:
versionin interfaceGridCacheVersionable- Returns:
- Version.
-
keys
public LinkedHashMap<KeyCacheObject,Boolean> keys()
- Returns:
- Keys
-
readThrough
public boolean readThrough()
- Returns:
- Read through flag.
-
skipValues
public boolean skipValues()
- Returns:
- Skip values flag. If true, boolean values indicating whether cache entry has a value will be returned as future result.
-
recovery
public boolean recovery()
- Returns:
- Recovery flag.
-
addReaders
public boolean addReaders()
-
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:
- Possible transaction label;
-
prepareMarshal
public void prepareMarshal(GridCacheSharedContext<?,?> ctx) throws IgniteCheckedException
Description copied from class:GridCacheMessageThis 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
Description copied from class:GridCacheMessageThis 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- Loader.- Throws:
IgniteCheckedException- If failed.
-
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.
-
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.
-
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.
-
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
-
-