Class GridNearTxPrepareRequest
- 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.GridDistributedTxPrepareRequest
-
- org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareRequest
-
- All Implemented Interfaces:
Serializable,GridCacheDeployable,IgniteTxStateAware,GridCacheVersionable,Message
public class GridNearTxPrepareRequest extends GridDistributedTxPrepareRequest
Near transaction prepare 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.GridDistributedTxPrepareRequest
STORE_WRITE_THROUGH_FLAG_MASK
-
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 GridNearTxPrepareRequest()Empty constructor required forExternalizable.GridNearTxPrepareRequest(IgniteUuid futId, AffinityTopologyVersion topVer, GridNearTxLocal tx, long timeout, Collection<IgniteTxEntry> reads, Collection<IgniteTxEntry> writes, boolean near, Map<UUID,Collection<UUID>> txNodes, boolean last, boolean onePhaseCommit, boolean retVal, boolean implicitSingle, boolean explicitLock, int taskNameHash, boolean firstClientReq, boolean allowWaitTopFut, boolean addDepInfo, boolean recovery)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallowWaitTopologyFuture()voidcloneEntries()shortdirectType()Gets message type.booleanexplicitLock()bytefieldsCount()Gets fields count.booleanfirstClientRequest()IgniteUuidfutureId()booleanimplicitSingle()intminiId()voidminiId(int miniId)booleannear()intpartition()booleanreadFrom(ByteBuffer buf, MessageReader reader)Reads this message from provided byte buffer.booleanrecovery()voidrecovery(boolean val)inttaskNameHash()AffinityTopologyVersiontopologyVersion()Gets topology version or -1 in case of topology version is not required for this message.StringtoString()protected booleantransferExpiryPolicy()@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.GridDistributedTxPrepareRequest
addDeploymentInfo, addDhtVersion, concurrency, dhtVersions, finishUnmarshal, isInvalidate, isolation, last, messageLogger, needReturnValue, needReturnValue, onePhaseCommit, policy, prepareMarshal, reads, reads, storeWriteThrough, storeWriteThrough, system, threadId, timeout, transactionNodes, txSize, txState, txState, writes, writes, writeVersion
-
Methods inherited from class org.apache.ignite.internal.processors.cache.distributed.GridDistributedBaseMessage
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, 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
-
GridNearTxPrepareRequest
public GridNearTxPrepareRequest()
Empty constructor required forExternalizable.
-
GridNearTxPrepareRequest
public GridNearTxPrepareRequest(IgniteUuid futId, AffinityTopologyVersion topVer, GridNearTxLocal tx, long timeout, Collection<IgniteTxEntry> reads, Collection<IgniteTxEntry> writes, boolean near, Map<UUID,Collection<UUID>> txNodes, boolean last, boolean onePhaseCommit, boolean retVal, boolean implicitSingle, boolean explicitLock, int taskNameHash, boolean firstClientReq, boolean allowWaitTopFut, boolean addDepInfo, boolean recovery)
- Parameters:
futId- Future ID.topVer- Topology version.tx- Transaction.timeout- Transaction timeout.reads- Read entries.writes- Write entries.near-Trueif mapping is for near caches.txNodes- Transaction nodes mapping.last-Trueif this last prepare request for node.onePhaseCommit- One phase commit flag.retVal- Return value flag.implicitSingle- Implicit single flag.explicitLock- Explicit lock flag.taskNameHash- Task name hash.firstClientReq-Trueif first optimistic tx prepare request sent from client node.allowWaitTopFut-Trueif it is safe for first client request to wait for topology future.addDepInfo- Deployment info flag.
-
-
Method Detail
-
allowWaitTopologyFuture
public boolean allowWaitTopologyFuture()
- Returns:
Trueif it is safe for first client request to wait for topology future completion.
-
recovery
public final boolean recovery()
- Returns:
- Recovery flag.
-
recovery
public void recovery(boolean val)
- Parameters:
val- Recovery flag.
-
firstClientRequest
public final boolean firstClientRequest()
- Returns:
Trueif first optimistic tx prepare request sent from client node.
-
near
public final boolean near()
- Returns:
Trueif mapping is for near-enabled caches.
-
futureId
public IgniteUuid futureId()
- Returns:
- Future ID.
-
miniId
public int miniId()
- Returns:
- Mini future ID.
-
miniId
public void miniId(int miniId)
- Parameters:
miniId- Mini future ID.
-
taskNameHash
public int taskNameHash()
- Returns:
- Task name hash.
-
implicitSingle
public final boolean implicitSingle()
- Returns:
- Implicit single flag.
-
explicitLock
public final boolean explicitLock()
- Returns:
- Explicit lock flag.
-
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.
-
txLabel
@Nullable public @Nullable String txLabel()
- Returns:
- Transaction label.
-
cloneEntries
public void cloneEntries()
-
transferExpiryPolicy
protected boolean transferExpiryPolicy()
- Overrides:
transferExpiryPolicyin classGridCacheMessage- Returns:
Trueif entries expire policy should be marshalled.
-
writeTo
public boolean writeTo(ByteBuffer buf, MessageWriter writer)
Writes this message to provided byte buffer.- Specified by:
writeToin interfaceMessage- Overrides:
writeToin classGridDistributedTxPrepareRequest- 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 classGridDistributedTxPrepareRequest- 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 classGridDistributedTxPrepareRequest- Returns:
- Message type.
-
fieldsCount
public byte fieldsCount()
Gets fields count.- Specified by:
fieldsCountin interfaceMessage- Overrides:
fieldsCountin classGridDistributedTxPrepareRequest- Returns:
- Fields count.
-
partition
public int partition()
- Overrides:
partitionin classGridCacheMessage- Returns:
- Partition ID this message is targeted to or
-1if it cannot be determined.
-
toString
public String toString()
- Overrides:
toStringin classGridDistributedTxPrepareRequest
-
-