Class GridNearLockRequest
- 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.near.GridNearLockRequest
-
- All Implemented Interfaces:
Serializable,GridCacheDeployable,GridCacheVersionable,Message
public class GridNearLockRequest extends GridDistributedLockRequest
Near cache lock request to primary node. 'Near' means 'Initiating node' here, not 'Near Cache'.- 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 GridNearLockRequest()Empty constructor required forExternalizable.GridNearLockRequest(int cacheId, @NotNull AffinityTopologyVersion topVer, UUID nodeId, long threadId, IgniteUuid futId, GridCacheVersion lockVer, boolean isInTx, boolean isRead, boolean retVal, TransactionIsolation isolation, boolean isInvalidate, long timeout, int keyCnt, int txSize, boolean syncCommit, int taskNameHash, long createTtl, long accessTtl, boolean skipStore, boolean keepBinary, boolean firstClientReq, boolean nearCache, boolean addDepInfo, @Nullable String txLbl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longaccessTtl()voidaddKeyBytes(KeyCacheObject key, boolean retVal, @Nullable GridCacheVersion dhtVer)Adds a key.longcreateTtl()GridCacheVersiondhtVersion(int idx)shortdirectType()Gets message type.bytefieldsCount()Gets fields count.booleanfirstClientRequest()intminiId()voidminiId(int miniId)booleannearCache()booleanneedReturnValue()booleanreadFrom(ByteBuffer buf, MessageReader reader)Reads this message from provided byte buffer.booleansyncCommit()inttaskNameHash()AffinityTopologyVersiontopologyVersion()Gets topology version or -1 in case of topology version is not required for this message.voidtopologyVersion(AffinityTopologyVersion topVer)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, finishUnmarshal, futureId, inTx, isInvalidate, isolation, keepBinary, keepBinary, keys, messageLogger, nearXidVersion, nodeId, partition, prepareMarshal, 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
-
GridNearLockRequest
public GridNearLockRequest()
Empty constructor required forExternalizable.
-
GridNearLockRequest
public GridNearLockRequest(int cacheId, @NotNull @NotNull AffinityTopologyVersion topVer, UUID nodeId, long threadId, IgniteUuid futId, GridCacheVersion lockVer, boolean isInTx, boolean isRead, boolean retVal, TransactionIsolation isolation, boolean isInvalidate, long timeout, int keyCnt, int txSize, boolean syncCommit, int taskNameHash, long createTtl, long accessTtl, boolean skipStore, boolean keepBinary, boolean firstClientReq, boolean nearCache, boolean addDepInfo, @Nullable @Nullable String txLbl)- Parameters:
cacheId- Cache ID.topVer- Topology version.nodeId- Node ID.threadId- Thread ID.futId- Future ID.lockVer- Cache version.isInTx-Trueif implicit transaction lock.isRead- Indicates whether implicit lock is for read or write operation.retVal- Return value flag.isolation- Transaction isolation.isInvalidate- Invalidation flag.timeout- Lock timeout.keyCnt- Number of keys.txSize- Expected transaction size.syncCommit- Synchronous commit flag.taskNameHash- Task name hash code.createTtl- TTL for create operation.accessTtl- TTL for read operation.skipStore- Skip store flag.firstClientReq-Trueif first lock request for lock operation sent from client node.addDepInfo- Deployment info flag.txLbl- Transaction label.
-
-
Method Detail
-
nearCache
public boolean nearCache()
- Returns:
Trueif near cache enabled on originating node.
-
firstClientRequest
public boolean firstClientRequest()
- Returns:
Trueif first lock request for lock operation sent from client node.
-
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.
-
topologyVersion
public void topologyVersion(AffinityTopologyVersion topVer)
- Parameters:
topVer- Topology version.
-
taskNameHash
public int taskNameHash()
- Returns:
- Task name hash.q
-
syncCommit
public boolean syncCommit()
- Returns:
- Sync commit flag.
-
miniId
public int miniId()
- Returns:
- Mini future ID.
-
miniId
public void miniId(int miniId)
- Parameters:
miniId- Mini future Id.
-
needReturnValue
public boolean needReturnValue()
- Returns:
- Need return value flag.
-
addKeyBytes
public void addKeyBytes(KeyCacheObject key, boolean retVal, @Nullable @Nullable GridCacheVersion dhtVer)
Adds a key.- Parameters:
key- Key.retVal- Flag indicating whether value should be returned.dhtVer- DHT version.
-
dhtVersion
public GridCacheVersion dhtVersion(int idx)
- Parameters:
idx- Index of the key.- Returns:
- DHT version for key at given index.
-
createTtl
public long createTtl()
- Returns:
- New TTL to set after entry is created, -1 to leave unchanged.
-
accessTtl
public long accessTtl()
- Returns:
- TTL for read operation.
-
txLabel
@Nullable public @Nullable String txLabel()
- Returns:
- Transaction label.
-
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
-
-