public class GridDistributedTxRemoteAdapter<K,V> extends IgniteTxAdapter<K,V> implements IgniteTxRemoteEx<K,V>
IgniteInternalTx.FinalizationStatus| Modifier and Type | Field and Description |
|---|---|
protected Map<IgniteTxKey<K>,IgniteTxEntry<K,V>> |
readMap
Read set.
|
protected Map<IgniteTxKey<K>,IgniteTxEntry<K,V>> |
writeMap
Write map.
|
cctx, 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| Constructor and Description |
|---|
GridDistributedTxRemoteAdapter()
Empty constructor required for
Externalizable. |
GridDistributedTxRemoteAdapter(GridCacheSharedContext<K,V> ctx,
UUID nodeId,
long rmtThreadId,
GridCacheVersion xidVer,
GridCacheVersion commitVer,
boolean sys,
TransactionConcurrency concurrency,
TransactionIsolation isolation,
boolean invalidate,
long timeout,
int txSize,
IgniteTxKey grpLockKey,
UUID subjId,
int taskNameHash) |
| Modifier and Type | Method and Description |
|---|---|
Collection<Integer> |
activeCacheIds() |
protected void |
addExplicit(IgniteTxEntry<K,V> e)
Adds explicit version if there is one.
|
Collection<IgniteTxEntry<K,V>> |
allEntries() |
Collection<GridCacheVersion> |
alternateVersions() |
void |
clearEntry(IgniteTxKey<K> key)
Clears entry from transaction as it never happened.
|
void |
commit()
Commits this transaction by initiating
two-phase-commit process. |
IgniteInternalFuture<IgniteInternalTx> |
commitAsync()
Asynchronously commits this transaction by initiating
two-phase-commit process. |
void |
doneRemote(GridCacheVersion baseVer,
Collection<GridCacheVersion> committedVers,
Collection<GridCacheVersion> rolledbackVers,
Collection<GridCacheVersion> pendingVers) |
boolean |
empty() |
IgniteTxEntry<K,V> |
entry(IgniteTxKey<K> key) |
UUID |
eventNodeId() |
void |
forceCommit()
Forces commit for this tx.
|
void |
groupLockKey(IgniteTxKey key)
Adds group lock key to remote transaction.
|
boolean |
hasWriteKey(IgniteTxKey<K> key) |
void |
invalidate(boolean invalidate) |
boolean |
isStarted() |
Collection<UUID> |
masterNodeIds() |
boolean |
onOwnerChanged(GridCacheEntryEx<K,V> entry,
GridCacheMvccCandidate<K> owner)
Callback invoked whenever there is a lock that has been acquired
by this transaction for any of the participating entries.
|
UUID |
originatingNodeId()
Gets node ID which directly started this transaction.
|
GridTuple<V> |
peek(GridCacheContext<K,V> cacheCtx,
boolean failFast,
K key,
IgnitePredicate<javax.cache.Cache.Entry<K,V>>[] filter) |
void |
prepare()
Prepare phase.
|
IgniteInternalFuture<IgniteInternalTx<K,V>> |
prepareAsync()
Prepare stage.
|
Collection<IgniteTxEntry<K,V>> |
readEntries() |
Map<IgniteTxKey<K>,IgniteTxEntry<K,V>> |
readMap() |
Set<IgniteTxKey<K>> |
readSet() |
long |
remoteThreadId() |
boolean |
removed(IgniteTxKey<K> key)
Checks whether given key has been removed within transaction.
|
void |
rollback()
Rolls back this transaction.
|
IgniteInternalFuture<IgniteInternalTx> |
rollbackAsync()
Asynchronously rollback this transaction.
|
void |
seal()
Seals transaction for updates.
|
boolean |
setWriteValue(IgniteTxEntry<K,V> e) |
String |
toString() |
Collection<IgniteTxEntry<K,V>> |
writeEntries() |
Map<IgniteTxKey<K>,IgniteTxEntry<K,V>> |
writeMap() |
Set<IgniteTxKey<K>> |
writeSet() |
addInvalidPartition, applyTransformClosures, awaitCompletion, awaitSignal, checkInternal, close, colocated, commitVersion, commitVersion, completedVersions, concurrency, conflictResolve, dht, done, endTime, endVersion, endVersion, enforceSerializable, equals, evictNearEntry, finalizationStatus, finishFuture, groupLock, groupLockEntry, groupLockKey, hashCode, hasTransforms, implicit, implicitSingle, initCommitVersion, internal, invalidPartitions, ioPolicy, isInvalidate, isNearLocallyMapped, isolation, isRollbackOnly, isSystemInvalidate, local, lock, lockTimeout, log, markFinalizing, markPreparing, near, nearXidVersion, needsCompletedVersions, 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, waitaddInvalidPartition, addMeta, close, colocated, commitVersion, commitVersion, completedVersions, concurrency, dht, done, endVersion, endVersion, enforceSerializable, finishFuture, groupLock, groupLockKey, hasTransforms, implicit, implicitSingle, internal, invalidPartitions, ioPolicy, isInvalidate, isolation, isRollbackOnly, isSystemInvalidate, local, markFinalizing, markPreparing, meta, near, nearXidVersion, needsCompletedVersions, nodeId, onePhaseCommit, optimistic, optimisticLockEntries, otherNodeId, ownedVersion, ownsLock, ownsLockUnsafe, pessimistic, proxy, readCommitted, remainingTime, removeMeta, repeatableRead, replicated, 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, timeoutId@GridToStringInclude protected Map<IgniteTxKey<K>,IgniteTxEntry<K,V>> readMap
@GridToStringInclude protected Map<IgniteTxKey<K>,IgniteTxEntry<K,V>> writeMap
public GridDistributedTxRemoteAdapter()
Externalizable.public GridDistributedTxRemoteAdapter(GridCacheSharedContext<K,V> ctx, UUID nodeId, long rmtThreadId, GridCacheVersion xidVer, GridCacheVersion commitVer, boolean sys, TransactionConcurrency concurrency, TransactionIsolation isolation, boolean invalidate, long timeout, int txSize, @Nullable IgniteTxKey grpLockKey, @Nullable UUID subjId, int taskNameHash)
ctx - Cache registry.nodeId - Node ID.rmtThreadId - Remote thread ID.xidVer - XID version.commitVer - Commit version.sys - System flag.concurrency - Concurrency level (should be pessimistic).isolation - Transaction isolation.invalidate - Invalidate flag.timeout - Timeout.txSize - Expected transaction size.grpLockKey - Group lock key if this is a group-lock transaction.subjId - Subject ID.taskNameHash - Task name hash code.public UUID eventNodeId()
eventNodeId in interface IgniteInternalTx<K,V>public Collection<UUID> masterNodeIds()
masterNodeIds in interface IgniteInternalTx<K,V>public UUID originatingNodeId()
originatingNodeId in interface IgniteInternalTx<K,V>public Collection<Integer> activeCacheIds()
activeCacheIds in interface IgniteInternalTx<K,V>public boolean empty()
empty in interface IgniteInternalTx<K,V>public boolean removed(IgniteTxKey<K> key)
removed in interface IgniteInternalTx<K,V>key - Key to check.True if key has been removed.public void invalidate(boolean invalidate)
invalidate in interface IgniteInternalTx<K,V>invalidate in class IgniteTxAdapter<K,V>invalidate - Invalidate flag.public Map<IgniteTxKey<K>,IgniteTxEntry<K,V>> writeMap()
writeMap in interface IgniteInternalTx<K,V>public Map<IgniteTxKey<K>,IgniteTxEntry<K,V>> readMap()
readMap in interface IgniteInternalTx<K,V>public void seal()
seal in interface IgniteInternalTx<K,V>public void groupLockKey(IgniteTxKey key)
key - Key.public GridTuple<V> peek(GridCacheContext<K,V> cacheCtx, boolean failFast, K key, IgnitePredicate<javax.cache.Cache.Entry<K,V>>[] filter) throws GridCacheFilterFailedException
peek in interface IgniteInternalTx<K,V>cacheCtx - Cache context.failFast - Fail-fast flag.key - Key to look up.filter - Filter to check.GridCacheFilterFailedException - If filter failed and failFast is true.public IgniteTxEntry<K,V> entry(IgniteTxKey<K> key)
entry in interface IgniteInternalTx<K,V>key - Key for the entry.public void clearEntry(IgniteTxKey<K> key)
key - key to be removed.public void doneRemote(GridCacheVersion baseVer, Collection<GridCacheVersion> committedVers, Collection<GridCacheVersion> rolledbackVers, Collection<GridCacheVersion> pendingVers)
doneRemote in interface IgniteTxRemoteEx<K,V>baseVer - Base version.committedVers - Committed versions.rolledbackVers - Rolled back versions.pendingVers - Pending versions.public boolean onOwnerChanged(GridCacheEntryEx<K,V> entry, GridCacheMvccCandidate<K> owner)
onOwnerChanged in interface IgniteInternalTx<K,V>entry - Cache entry.owner - Lock candidate that won ownership of the lock.True if transaction cared about notification.public boolean isStarted()
isStarted in class IgniteTxAdapter<K,V>True if transaction has at least one key enlisted.public long remoteThreadId()
remoteThreadId in interface IgniteTxRemoteEx<K,V>public boolean setWriteValue(IgniteTxEntry<K,V> e)
setWriteValue in interface IgniteTxRemoteEx<K,V>e - Transaction entry to set.True if value was set.public boolean hasWriteKey(IgniteTxKey<K> key)
hasWriteKey in interface IgniteInternalTx<K,V>key - Key to check.True if key is present.public IgniteInternalFuture<IgniteInternalTx<K,V>> prepareAsync()
prepareAsync in interface IgniteInternalTx<K,V>public Set<IgniteTxKey<K>> readSet()
readSet in interface IgniteInternalTx<K,V>public Set<IgniteTxKey<K>> writeSet()
writeSet in interface IgniteInternalTx<K,V>public Collection<IgniteTxEntry<K,V>> allEntries()
allEntries in interface IgniteInternalTx<K,V>public Collection<IgniteTxEntry<K,V>> writeEntries()
writeEntries in interface IgniteInternalTx<K,V>public Collection<IgniteTxEntry<K,V>> readEntries()
readEntries in interface IgniteInternalTx<K,V>public void prepare()
throws IgniteCheckedException
prepare in interface IgniteInternalTx<K,V>IgniteCheckedException - If prepare failed.public void commit()
throws IgniteCheckedException
two-phase-commit process.commit in interface IgniteInternalTx<K,V>IgniteCheckedException - If commit failed.public void forceCommit()
throws IgniteCheckedException
IgniteCheckedException - If commit failed.public IgniteInternalFuture<IgniteInternalTx> commitAsync()
two-phase-commit process.commitAsync in interface IgniteInternalTx<K,V>public void rollback()
rollback in interface IgniteInternalTx<K,V>public IgniteInternalFuture<IgniteInternalTx> rollbackAsync()
rollbackAsync in interface IgniteInternalTx<K,V>public Collection<GridCacheVersion> alternateVersions()
alternateVersions in interface IgniteInternalTx<K,V>protected void addExplicit(IgniteTxEntry<K,V> e)
e - Transaction entry.public String toString()
toString in class IgniteTxAdapter<K,V>
Follow @ApacheIgnite
Ignite Fabric : ver. 1.0.0-RC1 Release Date : February 17 2015