public class IgniteTxHandler extends Object
| Constructor and Description |
|---|
IgniteTxHandler(GridCacheSharedContext ctx) |
public IgniteTxHandler(GridCacheSharedContext ctx)
ctx - Shared cache context.public IgniteInternalFuture<GridNearTxPrepareResponse> prepareColocatedTx(GridNearTxLocal locTx, GridNearTxPrepareRequest req)
locTx - Local transaction.req - Near prepare request.public IgniteInternalFuture<GridNearTxPrepareResponse> prepareNearTxLocal(GridNearTxLocal originTx, GridNearTxPrepareRequest req)
originTx - Transaction for copy.req - Request.@Nullable public @Nullable IgniteInternalFuture<IgniteInternalTx> finish(UUID nodeId, @Nullable @Nullable GridNearTxLocal locTx, GridNearTxFinishRequest req)
nodeId - Node ID.locTx - Local transaction.req - Request.public IgniteInternalFuture<IgniteInternalTx> finishColocatedLocal(boolean commit, GridNearTxLocal tx)
commit - Commit flag (rollback if false).tx - Transaction to commit.protected void finish(UUID nodeId, IgniteTxRemoteEx tx, GridDhtTxFinishRequest req)
nodeId - Node ID.tx - Transaction.req - Request.protected void finish(GridDistributedTxRemoteAdapter tx, GridDhtTxPrepareRequest req) throws IgniteTxHeuristicCheckedException
tx - Transaction.req - Request.IgniteTxHeuristicCheckedExceptionpublic void mvccEnlistBatch(GridDhtTxRemote tx, GridCacheContext ctx, EnlistOperation op, List<KeyCacheObject> keys, List<Message> vals, MvccSnapshot snapshot, IgniteUuid futId, int batchNum) throws IgniteCheckedException
tx - Transaction.ctx - Cache context.op - Operation.keys - Keys.vals - Values sent from the primary node.snapshot - Mvcc snapshot.batchNum - Batch number.futId - Future id.IgniteCheckedException - If failed.protected void processCheckPreparedTxResponse(UUID nodeId, GridCacheTxRecoveryResponse res)
nodeId - Node ID.res - Response.public void applyPartitionsUpdatesCounters(Iterable<PartitionUpdateCountersMessage> counters) throws IgniteCheckedException
Called after entries are written to WAL on commit or during rollback to close gaps in update counter sequence.
counters - Counters.IgniteCheckedExceptionpublic void applyPartitionsUpdatesCounters(Iterable<PartitionUpdateCountersMessage> counters, boolean rollback, boolean rollbackOnPrimary) throws IgniteCheckedException
Called after entries are written to WAL on commit or during rollback to close gaps in update counter sequence.
On rollback counters should be applied on the primary only after backup nodes, otherwise if the primary fail before sending rollback requests to backups remote transactions can be committed by recovery protocol and partition consistency will not be restored when primary returns to the grid because RollbackRecord was written (actual for persistent mode only).
counters - Counter values to be updated.rollback - True if applied during rollbacks.rollbackOnPrimary - True if rollback happens on primary node. Passed to CQ engine.IgniteCheckedException@Nullable public @Nullable List<PartitionUpdateCountersMessage> filterUpdateCountersForBackupNode(IgniteInternalTx tx, ClusterNode node)
tx - Transaction.node - Backup node.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.10.0 Release Date : March 10 2021