Class GridNearTxRemote
- java.lang.Object
-
- org.apache.ignite.internal.util.lang.GridMetadataAwareAdapter
-
- org.apache.ignite.internal.processors.cache.transactions.IgniteTxAdapter
-
- org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxRemoteAdapter
-
- org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxRemote
-
- All Implemented Interfaces:
IgniteInternalTx,IgniteTxRemoteEx
public class GridNearTxRemote extends GridDistributedTxRemoteAdapter
Transaction created by system implicitly on remote nodes.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.ignite.internal.util.lang.GridMetadataAwareAdapter
GridMetadataAwareAdapter.EntryKey
-
Nested classes/interfaces inherited from interface org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx
IgniteInternalTx.FinalizationStatus
-
-
Field Summary
-
Fields inherited from class org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxRemoteAdapter
txState
-
Fields inherited from class org.apache.ignite.internal.processors.cache.transactions.IgniteTxAdapter
cctx, concurrency, consistentIdMapper, deploymentLdrId, implicit, invalidate, isDone, isolation, log, nodeId, onePhaseCommit, startTime, taskName, threadId, topVer, txNodes, txSize, xidVer
-
-
Constructor Summary
Constructors Constructor Description GridNearTxRemote(GridCacheSharedContext<?,?> ctx, AffinityTopologyVersion topVer, ClassLoader ldr, UUID nodeId, UUID nearNodeId, GridCacheVersion xidVer, GridCacheVersion commitVer, boolean sys, byte plc, TransactionConcurrency concurrency, TransactionIsolation isolation, boolean invalidate, long timeout, Collection<IgniteTxEntry> writeEntries, int txSize, @Nullable UUID subjId, int taskNameHash, @Nullable String txLbl)This constructor is meant for optimistic transactions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddActiveCache(GridCacheContext<?,?> cacheCtx, boolean recovery)Adds cache to the list of active caches in transaction.voidaddEntries(ClassLoader ldr, Iterable<IgniteTxEntry> entries)Adds entries to started near remote tx.booleanaddEntry(GridCacheContext<?,?> cacheCtx, IgniteTxKey key, GridCacheOperation op, CacheObject val, @Nullable GridCacheVersion drVer, boolean skipStore, boolean keepBinary)UUIDeventNodeId()Collection<IgniteTxKey>evicted()Collection<UUID>masterNodeIds()booleannear()GridCacheVersionownedVersion(IgniteTxKey key)Gets owned version for near remote transaction.voidownedVersions(Map<IgniteTxKey,GridCacheVersion> vers)Adds owned versions to map.booleanremote()StringtoString()-
Methods inherited from class org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxRemoteAdapter
activeCachesDeploymentEnabled, activeCachesDeploymentEnabled, addExplicit, allEntries, alternateVersions, clearEntry, commitAsync, commitError, commitRemoteTx, doneRemote, empty, entry, forceCommit, hasWriteKey, invalidate, isStarted, label, onOwnerChanged, originatingNodeId, peek, prepareRemoteTx, readEntries, readMap, readSet, rollbackAsync, rollbackRemoteTx, salvageTx, seal, txState, writeEntries, writeMap, writeSet
-
Methods inherited from class org.apache.ignite.internal.processors.cache.transactions.IgniteTxAdapter
addInvalidPartition, applyTransformClosures, applyTxSizes, batchStoreCommit, chainState, checkInternal, colocated, commitVersion, commitVersion, completedVersions, concurrency, conflictResolve, context, currentPrepareFuture, dht, done, equals, errorWhenCommitting, evictNearEntry, finalizationStatus, finishFuture, hashCode, heuristicException, implicit, implicitSingle, incrementalSnapshotId, incrementalSnapshotId, internal, invalidPartitions, ioPolicy, isInvalidate, isNearLocallyMapped, isolation, isRollbackOnly, isSystemInvalidate, isWriteToStoreFromDhtValid, local, localResult, log, logTxFinishErrorSafe, markFinalizing, nearXidVersion, needReturnValue, needReturnValue, needsCompletedVersions, nodeId, onePhaseCommit, onePhaseCommit, optimistic, optimisticLockEntries, otherNodeId, ownsLock, ownsLockUnsafe, pessimistic, readCommitted, recordStateChangedEvent, remainingTime, repeatableRead, resolveTaskName, rollbackException, serializable, sessionEnd, setParentTx, setRollbackOnly, size, skipCompletedVersions, skipCompletedVersions, startTime, startTimeNanos, state, state, state, storeEnabled, storeEnabled, storeWriteThrough, subjectId, system, systemInvalidate, taskNameHash, threadId, timedOut, timeout, timeout, timeoutException, timeoutException, topologyVersion, topologyVersion, topologyVersionSnapshot, transactionNodes, transactionNodes, txCounters, uncommit, updateNearCache, user, writeVersion, writeVersion, xid, xidVersion
-
Methods inherited from class org.apache.ignite.internal.util.lang.GridMetadataAwareAdapter
addMeta, addMetaIfAbsent, addMetaIfAbsent, allMeta, clone, copyMeta, copyMeta, hasMeta, hasMeta, meta, putMetaIfAbsent, removeAllMeta, removeMeta, removeMeta, replaceMeta
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx
addInvalidPartition, addMeta, colocated, commitVersion, commitVersion, completedVersions, concurrency, currentPrepareFuture, dht, done, errorWhenCommitting, finalizationStatus, finishFuture, implicit, implicitSingle, incrementalSnapshotId, incrementalSnapshotId, internal, invalidPartitions, ioPolicy, isInvalidate, isolation, isRollbackOnly, isSystemInvalidate, local, localResult, markFinalizing, meta, nearXidVersion, needsCompletedVersions, nodeId, onePhaseCommit, optimistic, optimisticLockEntries, otherNodeId, ownsLock, ownsLockUnsafe, pessimistic, readCommitted, remainingTime, removeMeta, repeatableRead, serializable, setRollbackOnly, size, startTime, startTimeNanos, state, state, storeEnabled, storeWriteThrough, subjectId, system, systemInvalidate, taskNameHash, threadId, timedOut, timeout, timeout, topologyVersion, topologyVersion, topologyVersionSnapshot, transactionNodes, txCounters, user, writeVersion, writeVersion, xid, xidVersion
-
-
-
-
Constructor Detail
-
GridNearTxRemote
public GridNearTxRemote(GridCacheSharedContext<?,?> ctx, AffinityTopologyVersion topVer, ClassLoader ldr, UUID nodeId, UUID nearNodeId, GridCacheVersion xidVer, GridCacheVersion commitVer, boolean sys, byte plc, TransactionConcurrency concurrency, TransactionIsolation isolation, boolean invalidate, long timeout, Collection<IgniteTxEntry> writeEntries, int txSize, @Nullable @Nullable UUID subjId, int taskNameHash, @Nullable @Nullable String txLbl) throws IgniteCheckedException
This constructor is meant for optimistic transactions.- Parameters:
topVer- Transaction topology version.ldr- Class loader.nodeId- Node ID.nearNodeId- Near node ID.xidVer- XID version.commitVer- Commit version.sys- System flag.plc- IO policy.concurrency- Concurrency level (should be pessimistic).isolation- Transaction isolation.invalidate- Invalidate flag.timeout- Timeout.writeEntries- Write entries.ctx- Cache registry.txSize- Expected transaction size.subjId- Subject ID.taskNameHash- Task name hash code.txLbl- Transaction label.- Throws:
IgniteCheckedException- If unmarshalling failed.
-
-
Method Detail
-
remote
public boolean remote()
- Overrides:
remotein classIgniteTxAdapter- Returns:
- True if transaction reflects changes in primary -> backup direction.
-
near
public boolean near()
- Specified by:
nearin interfaceIgniteInternalTx- Overrides:
nearin classIgniteTxAdapter- Returns:
Trueif near transaction.
-
eventNodeId
public UUID eventNodeId()
- Specified by:
eventNodeIdin interfaceIgniteInternalTx- Overrides:
eventNodeIdin classGridDistributedTxRemoteAdapter- Returns:
- Event node ID.
-
ownedVersion
public GridCacheVersion ownedVersion(IgniteTxKey key)
Gets owned version for near remote transaction.- Specified by:
ownedVersionin interfaceIgniteInternalTx- Overrides:
ownedVersionin classIgniteTxAdapter- Parameters:
key- Key to get version for.- Returns:
- Owned version, if any.
-
addActiveCache
public void addActiveCache(GridCacheContext<?,?> cacheCtx, boolean recovery)
Adds cache to the list of active caches in transaction.- Overrides:
addActiveCachein classGridDistributedTxRemoteAdapter- Parameters:
cacheCtx- Cache context to add.recovery- Recovery flag. SeeCacheOperationContext.setRecovery(boolean).
-
ownedVersions
public void ownedVersions(Map<IgniteTxKey,GridCacheVersion> vers)
Adds owned versions to map.- Parameters:
vers- Map of owned versions.
-
masterNodeIds
public Collection<UUID> masterNodeIds()
- Returns:
- Master node IDs.
-
evicted
public Collection<IgniteTxKey> evicted()
- Returns:
- Evicted keys.
-
addEntries
public void addEntries(ClassLoader ldr, Iterable<IgniteTxEntry> entries) throws IgniteCheckedException
Adds entries to started near remote tx.- Parameters:
ldr- Class loader.entries- Entries to add.- Throws:
IgniteCheckedException- If failed.
-
addEntry
public boolean addEntry(GridCacheContext<?,?> cacheCtx, IgniteTxKey key, GridCacheOperation op, CacheObject val, @Nullable @Nullable GridCacheVersion drVer, boolean skipStore, boolean keepBinary) throws IgniteCheckedException
- Parameters:
cacheCtx- Cache context.key- Key to add to read set.op- Operation.val- Value.drVer- Data center replication version.skipStore- Skip store flag.- Returns:
Trueif entry has been enlisted.- Throws:
IgniteCheckedException- If failed.
-
toString
public String toString()
- Overrides:
toStringin classGridDistributedTxRemoteAdapter
-
-