public class GridDistributedLockRequest<K,V> extends GridDistributedBaseMessage<K,V>
MessageAdapter.Type| Modifier and Type | Field and Description |
|---|---|
protected int |
idx
Key-bytes index.
|
verCACHE_MSG_INDEX_FIELD_NAME, cacheId, MAX_CACHE_MSG_LOOKUP_INDEXreader, readState| Constructor and Description |
|---|
GridDistributedLockRequest()
Empty constructor.
|
GridDistributedLockRequest(int cacheId,
UUID nodeId,
GridCacheVersion nearXidVer,
long threadId,
IgniteUuid futId,
GridCacheVersion lockVer,
boolean isInTx,
boolean isRead,
TransactionIsolation isolation,
boolean isInvalidate,
long timeout,
int keyCnt,
int txSize,
IgniteTxKey grpLockKey,
boolean partLock) |
| Modifier and Type | Method and Description |
|---|---|
void |
addKeyBytes(K key,
byte[] keyBytes,
boolean retVal,
Collection<GridCacheMvccCandidate<K>> cands,
GridCacheContext<K,V> ctx)
Adds a key.
|
byte |
directType()
Gets message type.
|
void |
finishUnmarshal(GridCacheSharedContext<K,V> ctx,
ClassLoader ldr)
This method is called after the message is deserialized and is responsible for
unmarshalling state marshalled in
GridCacheMessage.prepareMarshal(GridCacheSharedContext) method. |
IgniteUuid |
futureId() |
boolean |
groupLock() |
IgniteTxKey |
groupLockKey() |
boolean |
inTx() |
boolean |
isInvalidate() |
TransactionIsolation |
isolation() |
List<byte[]> |
keyBytes() |
List<K> |
keys() |
GridCacheVersion |
nearXidVersion() |
UUID |
nodeId() |
boolean |
partitionLock() |
void |
prepareMarshal(GridCacheSharedContext<K,V> ctx)
This method is called before the whole message is serialized
and is responsible for pre-marshalling state.
|
boolean |
readFrom(ByteBuffer buf)
Reads this message from provided byte buffer.
|
boolean[] |
returnFlags() |
boolean |
returnValue(int idx) |
long |
threadId() |
long |
timeout() |
String |
toString() |
boolean |
txRead() |
int |
txSize() |
boolean |
writeTo(ByteBuffer buf,
MessageWriter writer)
Writes this message to provided byte buffer.
|
candidatesByIndex, candidatesByIndex, candidatesByKey, candidatesByKey, candidatesByKey, committedVersions, completedVersions, keysCount, rolledbackVersions, version, versionallowForStartup, cacheId, cacheId, classError, deployInfo, ignoreClassErrors, lookupIndex, marshalBooleanLinkedMap, marshalCollection, marshalFilter, marshalInfo, marshalInfos, marshalInvokeArguments, marshalTx, marshalValuesCollection, messageId, nextIndexId, onClassError, prepare, prepareFilter, prepareObject, prepareObjects, topologyVersion, transactional, transferExpiryPolicy, unmarshalBooleanLinkedMap, unmarshalCollection, unmarshalFilter, unmarshalInfo, unmarshalInfos, unmarshalInvokeArguments, unmarshalTx, unmarshalValueBytesCollectionsetReader, skipRecoveryclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdeployInfo, preparepublic GridDistributedLockRequest()
public GridDistributedLockRequest(int cacheId,
UUID nodeId,
@Nullable
GridCacheVersion nearXidVer,
long threadId,
IgniteUuid futId,
GridCacheVersion lockVer,
boolean isInTx,
boolean isRead,
TransactionIsolation isolation,
boolean isInvalidate,
long timeout,
int keyCnt,
int txSize,
@Nullable
IgniteTxKey grpLockKey,
boolean partLock)
nodeId - Node ID.nearXidVer - Near transaction ID.threadId - Thread ID.futId - Future ID.lockVer - Cache version.isInTx - True if implicit transaction lock.isRead - Indicates whether implicit lock is for read or write operation.isolation - Transaction isolation.isInvalidate - Invalidation flag.timeout - Lock timeout.keyCnt - Number of keys.txSize - Expected transaction size.grpLockKey - Group lock key if this is a group-lock transaction.partLock - True if this is a group-lock transaction request and whole partition is
locked.public UUID nodeId()
public GridCacheVersion nearXidVersion()
public long threadId()
public IgniteUuid futureId()
public boolean inTx()
True if implicit transaction lock.public boolean isInvalidate()
public boolean txRead()
True if lock is implicit and for a read operation.public boolean returnValue(int idx)
idx - Key index.public boolean[] returnFlags()
public TransactionIsolation isolation()
public List<byte[]> keyBytes()
public int txSize()
public void addKeyBytes(K key, @Nullable byte[] keyBytes, boolean retVal, @Nullable Collection<GridCacheMvccCandidate<K>> cands, GridCacheContext<K,V> ctx) throws IgniteCheckedException
key - Key.retVal - Flag indicating whether value should be returned.keyBytes - Key bytes.cands - Candidates.ctx - Context.IgniteCheckedException - If failed.public boolean groupLock()
True if lock request for group-lock transaction.@Nullable public IgniteTxKey groupLockKey()
public boolean partitionLock()
True if partition is locked in group-lock transaction.public long timeout()
public void prepareMarshal(GridCacheSharedContext<K,V> ctx) throws IgniteCheckedException
prepareMarshal in class GridDistributedBaseMessage<K,V>ctx - IgniteCheckedException - If failed.public void finishUnmarshal(GridCacheSharedContext<K,V> ctx, ClassLoader ldr) throws IgniteCheckedException
GridCacheMessage.prepareMarshal(GridCacheSharedContext) method.finishUnmarshal in class GridDistributedBaseMessage<K,V>ctx - Context.ldr - Class loader.IgniteCheckedException - If failed.public boolean writeTo(ByteBuffer buf, MessageWriter writer)
writeTo in class GridDistributedBaseMessage<K,V>buf - Byte buffer.writer - Writer.public boolean readFrom(ByteBuffer buf)
readFrom in class GridDistributedBaseMessage<K,V>buf - Byte buffer.public byte directType()
directType in class MessageAdapterpublic String toString()
toString in class GridDistributedBaseMessage<K,V>
Follow @ApacheIgnite
Ignite Fabric : ver. 1.0.0-RC1 Release Date : February 17 2015