Class GridDhtLockRequest
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.GridCacheMessage
-
- org.apache.ignite.internal.processors.cache.GridCacheIdMessage
-
- org.apache.ignite.internal.processors.cache.distributed.GridDistributedBaseMessage
-
- org.apache.ignite.internal.processors.cache.distributed.GridDistributedLockRequest
-
- org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLockRequest
-
- All Implemented Interfaces:
Serializable,GridCacheDeployable,GridCacheVersionable,Message
public class GridDhtLockRequest extends GridDistributedLockRequest
DHT lock request.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.ignite.internal.processors.cache.distributed.GridDistributedLockRequest
idx
-
Fields inherited from class org.apache.ignite.internal.processors.cache.distributed.GridDistributedBaseMessage
ver
-
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 GridDhtLockRequest()Empty constructor required forExternalizable.GridDhtLockRequest(int cacheId, UUID nodeId, GridCacheVersion nearXidVer, long threadId, IgniteUuid futId, IgniteUuid miniId, GridCacheVersion lockVer, @NotNull AffinityTopologyVersion topVer, boolean isInTx, boolean isRead, TransactionIsolation isolation, boolean isInvalidate, long timeout, int dhtCnt, int txSize, int taskNameHash, long accessTtl, boolean skipStore, boolean storeUsed, boolean keepBinary, boolean addDepInfo, String txLbl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longaccessTtl()voidaddDhtKey(KeyCacheObject key, boolean invalidateEntry)Adds a DHT key.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.booleaninvalidateNearEntry(int idx)voidmarkLastKeyForPreload()Marks last added key for preloading.IgniteUuidminiId()UUIDnearNodeId()booleanneedPreloadKey(int idx)@Nullable GridCacheVersionowned(KeyCacheObject key)voidowned(KeyCacheObject key, GridCacheVersion ownerMapped)Sets owner and its mapped version.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.inttaskNameHash()AffinityTopologyVersiontopologyVersion()Gets topology version or -1 in case of topology version is not required for this message.StringtoString()@Nullable StringtxLabel()booleanwriteTo(ByteBuffer buf, MessageWriter writer)Writes this message to provided byte buffer.-
Methods inherited from class org.apache.ignite.internal.processors.cache.distributed.GridDistributedLockRequest
addKeyBytes, futureId, inTx, isInvalidate, isolation, keepBinary, keepBinary, keys, messageLogger, nearXidVersion, nodeId, partition, returnValue, skipStore, storeUsed, storeUsed, threadId, timeout, txRead, txSize
-
Methods inherited from class org.apache.ignite.internal.processors.cache.distributed.GridDistributedBaseMessage
addDeploymentInfo, committedVersions, completedVersions, rolledbackVersions, version, version
-
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, 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
-
-
-
-
Constructor Detail
-
GridDhtLockRequest
public GridDhtLockRequest()
Empty constructor required forExternalizable.
-
GridDhtLockRequest
public GridDhtLockRequest(int cacheId, UUID nodeId, GridCacheVersion nearXidVer, long threadId, IgniteUuid futId, IgniteUuid miniId, GridCacheVersion lockVer, @NotNull @NotNull AffinityTopologyVersion topVer, boolean isInTx, boolean isRead, TransactionIsolation isolation, boolean isInvalidate, long timeout, int dhtCnt, int txSize, int taskNameHash, long accessTtl, boolean skipStore, boolean storeUsed, boolean keepBinary, boolean addDepInfo, String txLbl)- Parameters:
cacheId- Cache ID.nodeId- Node ID.nearXidVer- Near transaction ID.threadId- Thread ID.futId- Future ID.miniId- Mini future ID.lockVer- Cache version.topVer- Topology version.isInTx-Trueif implicit transaction lock.isRead- Indicates whether implicit lock is for read or write operation.isolation- Transaction isolation.isInvalidate- Invalidation flag.timeout- Lock timeout.dhtCnt- DHT count.txSize- Expected transaction size.taskNameHash- Task name hash code.accessTtl- TTL for read operation.skipStore- Skip store flag.storeUsed- Cache store used flag.keepBinary- Keep binary flag.addDepInfo- Deployment info flag.txLbl- Transaction label.
-
-
Method Detail
-
nearNodeId
public UUID nearNodeId()
- Returns:
- Near node ID.
-
taskNameHash
public int taskNameHash()
- 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.
-
addDhtKey
public void addDhtKey(KeyCacheObject key, boolean invalidateEntry)
Adds a DHT key.- Parameters:
key- Key.invalidateEntry- Flag indicating whether node should attempt to invalidate reader.
-
markLastKeyForPreload
public void markLastKeyForPreload()
Marks last added key for preloading.
-
needPreloadKey
public boolean needPreloadKey(int idx)
- Parameters:
idx- Key index.- Returns:
Trueif need to preload key with given index.
-
owned
public void owned(KeyCacheObject key, GridCacheVersion ownerMapped)
Sets owner and its mapped version.- Parameters:
key- Key.ownerMapped- Owner mapped version.
-
owned
@Nullable public @Nullable GridCacheVersion owned(KeyCacheObject key)
- Parameters:
key- Key.- Returns:
- Owner and its mapped versions.
-
invalidateNearEntry
public boolean invalidateNearEntry(int idx)
- Parameters:
idx- Entry index to check.- Returns:
Trueif near entry should be invalidated.
-
miniId
public IgniteUuid miniId()
- Returns:
- Mini ID.
-
accessTtl
public long accessTtl()
- Returns:
- TTL for read operation.
-
txLabel
@Nullable public @Nullable String txLabel()
- Returns:
- Transaction label.
-
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 classGridDistributedLockRequest- 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 classGridDistributedLockRequest- Parameters:
ctx- Context.ldr- Class loader.- Throws:
IgniteCheckedException- If failed.
-
writeTo
public boolean writeTo(ByteBuffer buf, MessageWriter writer)
Writes this message to provided byte buffer.- Specified by:
writeToin interfaceMessage- Overrides:
writeToin classGridDistributedLockRequest- 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 classGridDistributedLockRequest- Parameters:
buf- Byte buffer.reader- Reader.- Returns:
- Whether message was fully read.
-
directType
public short directType()
Gets message type.- Specified by:
directTypein interfaceMessage- Overrides:
directTypein classGridDistributedLockRequest- Returns:
- Message type.
-
fieldsCount
public byte fieldsCount()
Gets fields count.- Specified by:
fieldsCountin interfaceMessage- Overrides:
fieldsCountin classGridDistributedLockRequest- Returns:
- Fields count.
-
toString
public String toString()
- Overrides:
toStringin classGridDistributedLockRequest
-
-