public abstract class GridDhtTxLocalAdapter<K,V> extends IgniteTxLocalAdapter<K,V>
IgniteTxLocalAdapter.FinishClosure<T>, IgniteTxLocalAdapter.PLC1<T>, IgniteTxLocalAdapter.PLC2<T>, IgniteTxLocalAdapter.PMC<T>, IgniteTxLocalAdapter.PostLockClosure1<T>, IgniteTxLocalAdapter.PostLockClosure2<T>, IgniteTxLocalAdapter.PostMissClosure<T>IgniteInternalTx.FinalizationStatus| Modifier and Type | Field and Description |
|---|---|
protected Map<UUID,GridDistributedTxMapping<K,V>> |
dhtMap
DHT mappings.
|
protected Map<UUID,GridDistributedTxMapping<K,V>> |
nearMap
Near mappings.
|
activeCacheIds, commitErr, doneFlag, implicitRes, minVer, needRetVal, readView, txMap, writeViewcctx, concurrency, endVer, grpLockKey, implicit, implicitSingle, internal, invalidate, isDone, isolation, loc, log, nodeId, onePhaseCommit, startTime, startVer, storeEnabled, subjId, syncCommit, syncRollback, taskName, taskNameHash, threadId, timeout, transform, txNodes, txSize, writeVer, xidVer| Modifier | Constructor and Description |
|---|---|
protected |
GridDhtTxLocalAdapter()
Empty constructor required for
Externalizable. |
protected |
GridDhtTxLocalAdapter(GridCacheSharedContext<K,V> cctx,
GridCacheVersion xidVer,
boolean implicit,
boolean implicitSingle,
boolean sys,
TransactionConcurrency concurrency,
TransactionIsolation isolation,
long timeout,
boolean invalidate,
boolean storeEnabled,
int txSize,
IgniteTxKey grpLockKey,
boolean partLock,
UUID subjId,
int taskNameHash) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDhtMapping(Map<UUID,GridDistributedTxMapping<K,V>> mappings) |
IgniteInternalFuture<Boolean> |
addEntry(long msgId,
IgniteTxEntry<K,V> e) |
protected void |
addGroupTxMapping(Collection<IgniteTxKey<K>> keys)
Adds key mapping to transaction.
|
void |
addInvalidPartition(GridCacheContext<K,V> ctx,
int part) |
void |
addNearMapping(Map<UUID,GridDistributedTxMapping<K,V>> mappings) |
protected abstract IgniteInternalFuture<Boolean> |
addReader(long msgId,
GridDhtCacheEntry<K,V> cached,
IgniteTxEntry<K,V> entry,
long topVer)
Adds reader to cached entry.
|
protected abstract void |
clearPrepareFuture(GridDhtTxPrepareFuture<K,V> fut)
Removes previously created prepare future from atomic reference.
|
boolean |
finish(boolean commit)
Finishes transaction (either commit or rollback).
|
protected void |
mapExplicitLocks()
Map explicit locks.
|
protected abstract IgniteUuid |
nearFutureId() |
protected abstract IgniteUuid |
nearMiniId() |
protected abstract UUID |
nearNodeId() |
boolean |
needsCompletedVersions() |
void |
needsCompletedVersions(boolean needsCompletedVers) |
Collection<GridCacheVersion> |
pendingVersions() |
void |
pendingVersions(Collection<GridCacheVersion> pendingVers) |
boolean |
removeMapping(UUID nodeId) |
void |
rollback()
Rolls back this transaction.
|
protected abstract void |
sendFinishReply(boolean commit,
Throwable err) |
String |
toString() |
accessPolicy, activeCacheIds, addActiveCache, addEntry, allEntries, alternateVersions, batchStoreCommit, checkValid, commit, commitAfterLock, commitError, commitError, committedVersions, completedBase, completedVersions, empty, enlistWrite, entry, entryEx, entryEx, entryExpireTime, entryTtl, entryTtl, eventNodeId, getAllAsync, groupLockAsync, hasWriteKey, implicitSingleResult, implicitSingleResult, init, invokeAsync, isStarted, loadMissing, masterNodeIds, minVersion, needReturnValue, needReturnValue, onOwnerChanged, originatingNodeId, partitionLock, peek, postLockWrite, prepare, putAllAsync, putAllDrAsync, readEntries, readMap, readSet, removeAllAsync, removeAllDrAsync, removed, rolledbackVersions, seal, sendTransformedValues, tmCommit, updateExplicitVersion, userCommit, userPrepare, userRollback, writeEntries, writeMap, writeSetapplyTransformClosures, awaitCompletion, awaitSignal, checkInternal, close, colocated, commitVersion, commitVersion, concurrency, conflictResolve, dht, done, endTime, endVersion, endVersion, enforceSerializable, equals, evictNearEntry, finalizationStatus, finishFuture, groupLock, groupLockEntry, groupLockKey, hashCode, hasTransforms, implicit, implicitSingle, initCommitVersion, internal, invalidate, invalidPartitions, ioPolicy, isInvalidate, isNearLocallyMapped, isolation, isRollbackOnly, isSystemInvalidate, local, lock, lockTimeout, log, markFinalizing, markPreparing, near, nearXidVersion, nodeId, onePhaseCommit, onePhaseCommit, onTimeout, optimistic, optimisticLockEntries, otherNodeId, ownedVersion, ownsLock, ownsLockUnsafe, pessimistic, proxy, readCommitted, readExternal, readResolve, remainingTime, repeatableRead, replicated, resolveTaskName, serializable, setRollbackOnly, signalAll, size, startTime, startVersion, state, state, store, storeEnabled, storeEnabled, storeUsed, subjectId, syncCommit, syncCommit, syncRollback, syncRollback, system, systemInvalidate, taskNameHash, threadId, timedOut, timeout, timeout, timeoutId, topologyVersion, topologyVersion, transactionNodes, transactionNodes, uncommit, unlock, updateNearCache, user, writeExternal, writeVersion, writeVersion, xid, xidVersionaddMeta, addMetaIfAbsent, addMetaIfAbsent, allMeta, clone, copyMeta, copyMeta, hasMeta, hasMeta, meta, putMetaIfAbsent, putMetaIfAbsent, readExternalMeta, removeMeta, removeMeta, replaceMeta, writeExternalMetafinalize, getClass, notify, notifyAll, wait, wait, waitgroupLockEntryaddMeta, close, colocated, commitAsync, commitVersion, commitVersion, concurrency, dht, done, endVersion, endVersion, enforceSerializable, finishFuture, groupLock, groupLockKey, hasTransforms, implicit, implicitSingle, internal, invalidate, invalidPartitions, ioPolicy, isInvalidate, isolation, isRollbackOnly, isSystemInvalidate, local, markFinalizing, markPreparing, meta, near, nearXidVersion, nodeId, onePhaseCommit, optimistic, optimisticLockEntries, otherNodeId, ownedVersion, ownsLock, ownsLockUnsafe, pessimistic, prepareAsync, proxy, readCommitted, remainingTime, removeMeta, repeatableRead, replicated, rollbackAsync, serializable, setRollbackOnly, size, startTime, startVersion, state, state, storeEnabled, storeUsed, subjectId, syncCommit, syncRollback, system, systemInvalidate, taskNameHash, threadId, timedOut, timeout, timeout, topologyVersion, topologyVersion, transactionNodes, user, writeVersion, writeVersion, xid, xidVersionendTime, onTimeout, timeoutIdprotected Map<UUID,GridDistributedTxMapping<K,V>> nearMap
protected Map<UUID,GridDistributedTxMapping<K,V>> dhtMap
protected GridDhtTxLocalAdapter()
Externalizable.protected GridDhtTxLocalAdapter(GridCacheSharedContext<K,V> cctx, GridCacheVersion xidVer, boolean implicit, boolean implicitSingle, boolean sys, TransactionConcurrency concurrency, TransactionIsolation isolation, long timeout, boolean invalidate, boolean storeEnabled, int txSize, @Nullable IgniteTxKey grpLockKey, boolean partLock, @Nullable UUID subjId, int taskNameHash)
xidVer - Transaction version.implicit - Implicit flag.implicitSingle - Implicit-with-single-key flag.cctx - Cache context.sys - System flag.concurrency - Concurrency.isolation - Isolation.timeout - Timeout.txSize - Expected transaction size.grpLockKey - Group lock key if this is a group-lock transaction.partLock - If this is a group-lock transaction and the whole partition should be locked.protected abstract UUID nearNodeId()
protected abstract IgniteUuid nearFutureId()
protected abstract IgniteUuid nearMiniId()
@Nullable protected abstract IgniteInternalFuture<Boolean> addReader(long msgId, GridDhtCacheEntry<K,V> cached, IgniteTxEntry<K,V> entry, long topVer)
msgId - Message ID.cached - Cached entry.entry - Transaction entry.topVer - Topology version.True if reader was added as a result of this call.protected abstract void sendFinishReply(boolean commit,
@Nullable
Throwable err)
commit - Commit flag.err - Error, if any.public void needsCompletedVersions(boolean needsCompletedVers)
needsCompletedVers - True if needs completed versions.public boolean needsCompletedVersions()
needsCompletedVersions in interface IgniteInternalTx<K,V>needsCompletedVersions in class IgniteTxAdapter<K,V>True if transaction needs completed versions for processing.public Collection<GridCacheVersion> pendingVersions()
public void pendingVersions(Collection<GridCacheVersion> pendingVers)
pendingVers - Versions for all pending locks that were in queue before tx locsk were released.protected void mapExplicitLocks()
public void addDhtMapping(Map<UUID,GridDistributedTxMapping<K,V>> mappings)
mappings - Mappings to add.public void addNearMapping(Map<UUID,GridDistributedTxMapping<K,V>> mappings)
mappings - Mappings to add.public boolean removeMapping(UUID nodeId)
nodeId - Node ID.True if mapping was removed.public void addInvalidPartition(GridCacheContext<K,V> ctx, int part)
addInvalidPartition in interface IgniteInternalTx<K,V>addInvalidPartition in class IgniteTxAdapter<K,V>ctx - Cache context.part - Invalid partition.@Nullable public IgniteInternalFuture<Boolean> addEntry(long msgId, IgniteTxEntry<K,V> e) throws IgniteCheckedException
msgId - Message ID.e - Entry to add.IgniteCheckedException - If failed.protected void addGroupTxMapping(Collection<IgniteTxKey<K>> keys)
addGroupTxMapping in class IgniteTxLocalAdapter<K,V>keys - Keys to add.public boolean finish(boolean commit)
throws IgniteCheckedException
commit - True if commit, false if rollback.True if state has been changed.IgniteCheckedException - If finish failed.protected abstract void clearPrepareFuture(GridDhtTxPrepareFuture<K,V> fut)
fut - Expected future.public void rollback()
throws IgniteCheckedException
IgniteCheckedException - If rollback failed.public String toString()
toString in class IgniteTxLocalAdapter<K,V>
Follow @ApacheIgnite
Ignite Fabric : ver. 1.0.0-RC1 Release Date : February 17 2015