public class GridDhtLockRequest<K,V> extends GridDistributedLockRequest<K,V>
MessageAdapter.TypeidxverCACHE_MSG_INDEX_FIELD_NAME, cacheId, MAX_CACHE_MSG_LOOKUP_INDEXreader, readState| Constructor and Description |
|---|
GridDhtLockRequest()
Empty constructor required for
Externalizable. |
GridDhtLockRequest(int cacheId,
UUID nodeId,
GridCacheVersion nearXidVer,
long threadId,
IgniteUuid futId,
IgniteUuid miniId,
GridCacheVersion lockVer,
long topVer,
boolean isInTx,
boolean isRead,
TransactionIsolation isolation,
boolean isInvalidate,
long timeout,
int dhtCnt,
int nearCnt,
int txSize,
IgniteTxKey grpLockKey,
boolean partLock,
UUID subjId,
int taskNameHash,
long accessTtl) |
| Modifier and Type | Method and Description |
|---|---|
long |
accessTtl() |
void |
addDhtKey(K key,
byte[] keyBytes,
boolean invalidateEntry,
GridCacheContext<K,V> ctx)
Adds a DHT key.
|
void |
addNearKey(K key,
byte[] keyBytes,
GridCacheSharedContext<K,V> ctx)
Adds a Near key.
|
boolean |
allowForStartup() |
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. |
boolean |
invalidateNearEntry(int idx) |
void |
markLastKeyForPreload()
Marks last added key for preloading.
|
IgniteUuid |
miniId() |
List<byte[]> |
nearKeyBytes() |
List<K> |
nearKeys() |
UUID |
nearNodeId() |
boolean |
needPreloadKey(int idx) |
GridCacheVersion |
owned(K key) |
void |
owned(K key,
byte[] keyBytes,
GridCacheVersion ownerMapped)
Sets owner and its mapped version.
|
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.
|
UUID |
subjectId() |
int |
taskNameHash() |
long |
topologyVersion()
Gets topology version or -1 in case of topology version is not required for this message.
|
String |
toString() |
boolean |
writeTo(ByteBuffer buf,
MessageWriter writer)
Writes this message to provided byte buffer.
|
addKeyBytes, futureId, groupLock, groupLockKey, inTx, isInvalidate, isolation, keyBytes, keys, nearXidVersion, nodeId, partitionLock, returnFlags, returnValue, threadId, timeout, txRead, txSizecandidatesByIndex, candidatesByIndex, candidatesByKey, candidatesByKey, candidatesByKey, committedVersions, completedVersions, keysCount, rolledbackVersions, version, versioncacheId, cacheId, classError, deployInfo, ignoreClassErrors, lookupIndex, marshalBooleanLinkedMap, marshalCollection, marshalFilter, marshalInfo, marshalInfos, marshalInvokeArguments, marshalTx, marshalValuesCollection, messageId, nextIndexId, onClassError, prepare, prepareFilter, prepareObject, prepareObjects, transactional, transferExpiryPolicy, unmarshalBooleanLinkedMap, unmarshalCollection, unmarshalFilter, unmarshalInfo, unmarshalInfos, unmarshalInvokeArguments, unmarshalTx, unmarshalValueBytesCollectionsetReader, skipRecoveryclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdeployInfo, preparepublic GridDhtLockRequest()
Externalizable.public GridDhtLockRequest(int cacheId,
UUID nodeId,
GridCacheVersion nearXidVer,
long threadId,
IgniteUuid futId,
IgniteUuid miniId,
GridCacheVersion lockVer,
long topVer,
boolean isInTx,
boolean isRead,
TransactionIsolation isolation,
boolean isInvalidate,
long timeout,
int dhtCnt,
int nearCnt,
int txSize,
@Nullable
IgniteTxKey grpLockKey,
boolean partLock,
@Nullable
UUID subjId,
int taskNameHash,
long accessTtl)
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 - 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.dhtCnt - DHT count.nearCnt - Near count.txSize - Expected transaction size.grpLockKey - Group lock key.partLock - True if partition lock.subjId - Subject ID.taskNameHash - Task name hash code.accessTtl - TTL for read operation.public boolean allowForStartup()
allowForStartup in class GridCacheMessage<K,V>True if this message is preloader message.public UUID nearNodeId()
public UUID subjectId()
public int taskNameHash()
public long topologyVersion()
GridCacheMessagetopologyVersion in class GridCacheMessage<K,V>public List<byte[]> nearKeyBytes()
public void addNearKey(K key, byte[] keyBytes, GridCacheSharedContext<K,V> ctx) throws IgniteCheckedException
key - Key.keyBytes - Key bytes.ctx - Context.IgniteCheckedException - If failed.public void addDhtKey(K key, byte[] keyBytes, boolean invalidateEntry, GridCacheContext<K,V> ctx) throws IgniteCheckedException
key - Key.keyBytes - Key bytes.invalidateEntry - Flag indicating whether node should attempt to invalidate reader.ctx - Context.IgniteCheckedException - If failed.public void markLastKeyForPreload()
public boolean needPreloadKey(int idx)
idx - Key index.True if need to preload key with given index.public void owned(K key, byte[] keyBytes, GridCacheVersion ownerMapped)
key - Key.keyBytes - Key bytes.ownerMapped - Owner mapped version.@Nullable public GridCacheVersion owned(K key)
key - Key.public boolean invalidateNearEntry(int idx)
idx - Entry index to check.True if near entry should be invalidated.public IgniteUuid miniId()
public long accessTtl()
public void prepareMarshal(GridCacheSharedContext<K,V> ctx) throws IgniteCheckedException
prepareMarshal in class GridDistributedLockRequest<K,V>ctx - IgniteCheckedException - If failed.public void finishUnmarshal(GridCacheSharedContext<K,V> ctx, ClassLoader ldr) throws IgniteCheckedException
GridCacheMessage.prepareMarshal(GridCacheSharedContext) method.finishUnmarshal in class GridDistributedLockRequest<K,V>ctx - Context.ldr - Class loader.IgniteCheckedException - If failed.public boolean writeTo(ByteBuffer buf, MessageWriter writer)
writeTo in class GridDistributedLockRequest<K,V>buf - Byte buffer.writer - Writer.public boolean readFrom(ByteBuffer buf)
readFrom in class GridDistributedLockRequest<K,V>buf - Byte buffer.public byte directType()
directType in class GridDistributedLockRequest<K,V>public String toString()
toString in class GridDistributedLockRequest<K,V>
Follow @ApacheIgnite
Ignite Fabric : ver. 1.0.0-RC1 Release Date : February 17 2015