org.apache.ignite.internal.processors.cache.transactions

## Class IgniteTxLocalAdapter

- java.lang.Object
- - org.apache.ignite.internal.util.lang.GridMetadataAwareAdapter
  - - org.apache.ignite.internal.processors.cache.transactions.IgniteTxAdapter
    - - org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalAdapter

All Implemented Interfaces:
  Externalizable, Serializable, AutoCloseable, IgniteInternalTx, IgniteTxLocalEx

Direct Known Subclasses:
  GridDhtTxLocalAdapter

    public abstract class IgniteTxLocalAdapter
    extends IgniteTxAdapter
    implements IgniteTxLocalEx

Transaction adapter for cache transactions.

See Also:
  Serialized Form

### Nested Class Summary

Nested Classes
`protected class` `IgniteTxLocalAdapter.FinishClosure<T>` Post-lock closure.
`protected class` `IgniteTxLocalAdapter.PLC1<T>` Post-lock closure alias.
`protected class` `IgniteTxLocalAdapter.PLC2<T>` Post-lock closure alias.
`protected class` `IgniteTxLocalAdapter.PMC<T>` Post-lock closure alias.
`protected class` `IgniteTxLocalAdapter.PostLockClosure1<T>` Post-lock closure.
`protected class` `IgniteTxLocalAdapter.PostLockClosure2<T>` Post-lock closure.
`protected class` `IgniteTxLocalAdapter.PostMissClosure<T>` Post-lock closure.

### 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
`protected static AtomicReferenceFieldUpdater<IgniteTxLocalAdapter,Throwable>` `COMMIT_ERR_UPD` Commit error updater.
`protected Throwable` `commitErr` Commit error.
`protected static AtomicIntegerFieldUpdater<IgniteTxLocalAdapter>` `DONE_FLAG_UPD` Done flag updater.
`protected int` `doneFlag` Flag indicating with TM commit happened.
`protected GridCacheReturn` `implicitRes` Implicit transaction result.
`protected GridCacheVersion` `minVer` Minimal version encountered (either explicit lock or XID of this transaction).
`protected IgniteTxLocalState` `txState`

### Fields inherited from class org.apache.ignite.internal.processors.cache.transactions.IgniteTxAdapter

`cctx, concurrency, endVer, implicit, internal, invalidate, isDone, isolation, loc, log, needRetVal, nodeId, onePhaseCommit, startTime, startVer, storeEnabled, subjId, syncMode, taskName, taskNameHash, threadId, timeout, topVer, transform, txNodes, txSize, writeVer, xidVer`

### Constructor Summary

Constructors
`protected` `IgniteTxLocalAdapter()` Empty constructor required for `Externalizable`.
`protected` `IgniteTxLocalAdapter(GridCacheSharedContext cctx, GridCacheVersion xidVer, boolean implicit, boolean implicitSingle, boolean sys, byte plc, TransactionConcurrency concurrency, TransactionIsolation isolation, long timeout, boolean invalidate, boolean storeEnabled, boolean onePhaseCommit, int txSize, UUID subjId, int taskNameHash)`

### Method Summary

Methods
`protected IgniteCacheExpiryPolicy` `accessPolicy(GridCacheContext cacheCtx, Collection<KeyCacheObject> keys)`
`protected IgniteCacheExpiryPolicy` `accessPolicy(GridCacheContext ctx, IgniteTxKey key, javax.cache.expiry.ExpiryPolicy expiryPlc)`
`boolean` `activeCachesDeploymentEnabled()`
`void` `activeCachesDeploymentEnabled(boolean depEnabled)`
`protected void` `addActiveCache(GridCacheContext cacheCtx)` Adds cache to the list of active caches in transaction.
`protected IgniteTxEntry` `addEntry(GridCacheOperation op, CacheObject val, javax.cache.processor.EntryProcessor entryProcessor, Object[] invokeArgs, GridCacheEntryEx entry, javax.cache.expiry.ExpiryPolicy expiryPlc, CacheEntryPredicate[] filter, boolean filtersSet, long drTtl, long drExpireTime, GridCacheVersion drVer, boolean skipStore, boolean keepBinary)`
`Collection<IgniteTxEntry>` `allEntries()`
`Collection<GridCacheVersion>` `alternateVersions()`
`protected void` `checkValid()` Checks transaction expiration.
`void` `commit()` Commits this transaction by initiating `two-phase-commit` process.
`protected boolean` `commitAfterLock()`
`Throwable` `commitError()`
`void` `commitError(Throwable e)`
`Collection<GridCacheVersion>` `committedVersions()`
`GridCacheVersion` `completedBase()`
`void` `completedVersions(GridCacheVersion completedBase, Collection<GridCacheVersion> committedVers, Collection<GridCacheVersion> rolledbackVers)`
`boolean` `empty()`
`IgniteTxEntry` `entry(IgniteTxKey key)`
`protected GridCacheEntryEx` `entryEx(GridCacheContext cacheCtx, IgniteTxKey key)` Gets cache entry for given key.
`protected GridCacheEntryEx` `entryEx(GridCacheContext cacheCtx, IgniteTxKey key, AffinityTopologyVersion topVer)` Gets cache entry for given key and topology version.
`long` `entryExpireTime(IgniteTxKey key)`
`long` `entryTtl(IgniteTxKey key)`
`UUID` `eventNodeId()`
`<K,V> IgniteInternalFuture<Map<K,V>>` `getAllAsync(GridCacheContext cacheCtx, AffinityTopologyVersion entryTopVer, Collection<KeyCacheObject> keys, boolean deserializeBinary, boolean skipVals, boolean keepCacheObjects, boolean skipStore, boolean needVer)`
`boolean` `hasInterceptor()`
`boolean` `hasWriteKey(IgniteTxKey key)`
`void` `implicitSingleResult(GridCacheReturn ret)`
`boolean` `init()` Initializes read map.
`protected void` `initResult()` Creates result instance.
`<K,V> IgniteInternalFuture<GridCacheReturn>` `invokeAsync(GridCacheContext cacheCtx, AffinityTopologyVersion entryTopVer, K key, javax.cache.processor.EntryProcessor<K,V,Object> entryProcessor, Object... invokeArgs)`
`<K,V,T> IgniteInternalFuture<GridCacheReturn>` `invokeAsync(GridCacheContext cacheCtx, AffinityTopologyVersion entryTopVer, Map<? extends K,? extends javax.cache.processor.EntryProcessor<K,V,Object>> map, Object... invokeArgs)`
`boolean` `isStarted()`
`IgniteInternalFuture<Void>` `loadMissing(GridCacheContext cacheCtx, AffinityTopologyVersion topVer, boolean readThrough, boolean async, Collection<KeyCacheObject> keys, boolean skipVals, boolean needVer, boolean keepBinary, GridInClosure3<KeyCacheObject,Object,GridCacheVersion> c)`
`Collection<UUID>` `masterNodeIds()`
`GridCacheVersion` `minVersion()` Gets minimum version present in transaction.
`boolean` `onOwnerChanged(GridCacheEntryEx entry, GridCacheMvccCandidate 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<CacheObject>` `peek(GridCacheContext cacheCtx, boolean failFast, KeyCacheObject key)`
`protected void` `postLockWrite(GridCacheContext cacheCtx, Iterable<KeyCacheObject> keys, GridCacheReturn ret, boolean rmv, boolean retval, boolean read, long accessTtl, CacheEntryPredicate[] filter, boolean computeInvoke)` Post lock processing for put or remove.
`void` `prepare()` Prepare state.
`<K,V> IgniteInternalFuture<GridCacheReturn>` `putAllAsync(GridCacheContext cacheCtx, AffinityTopologyVersion entryTopVer, Map<? extends K,? extends V> map, boolean retval)`
`IgniteInternalFuture<?>` `putAllDrAsync(GridCacheContext cacheCtx, Map<KeyCacheObject,GridCacheDrInfo> drMap)`
`<K,V> IgniteInternalFuture<GridCacheReturn>` `putAsync(GridCacheContext cacheCtx, AffinityTopologyVersion entryTopVer, K key, V val, boolean retval, CacheEntryPredicate filter)`
`Collection<IgniteTxEntry>` `readEntries()`
`Map<IgniteTxKey,IgniteTxEntry>` `readMap()`
`Set<IgniteTxKey>` `readSet()`
`<K,V> IgniteInternalFuture<GridCacheReturn>` `removeAllAsync(GridCacheContext cacheCtx, AffinityTopologyVersion entryTopVer, Collection<? extends K> keys, boolean retval, CacheEntryPredicate filter, boolean singleRmv)`
`IgniteInternalFuture<?>` `removeAllDrAsync(GridCacheContext cacheCtx, Map<KeyCacheObject,GridCacheVersion> drMap)`
`Collection<GridCacheVersion>` `rolledbackVersions()`
`void` `seal()` Seals transaction for updates.
`void` `sendTransformedValues(boolean snd)`
`void` `tmFinish(boolean commit)` Commits transaction to transaction manager.
`String` `toString()`
`IgniteTxState` `txState()`
`protected void` `updateExplicitVersion(IgniteTxEntry txEntry, GridCacheEntryEx entry)` Updates explicit version for tx entry based on current entry lock owner.
`void` `userCommit()`
`void` `userPrepare()`
`void` `userRollback()`
`Collection<IgniteTxEntry>` `writeEntries()`
`Map<IgniteTxKey,IgniteTxEntry>` `writeMap()`
`Set<IgniteTxKey>` `writeSet()`

### Methods inherited from class org.apache.ignite.internal.processors.cache.transactions.IgniteTxAdapter

`addInvalidPartition, applyTransformClosures, batchStoreCommit, checkInternal, close, colocated, commitVersion, commitVersion, concurrency, conflictResolve, currentPrepareFuture, dht, done, endVersion, equals, errorWhenCommitting, evictNearEntry, finalizationStatus, finishFuture, hashCode, hasTransforms, implicit, implicitSingle, internal, invalidate, invalidPartitions, ioPolicy, isInvalidate, isNearLocallyMapped, isolation, isRollbackOnly, isSystemInvalidate, isWriteToStoreFromDhtValid, local, localResult, log, markFinalizing, markPreparing, near, nearXidVersion, needReturnValue, needReturnValue, needsCompletedVersions, nodeId, onePhaseCommit, onePhaseCommit, onRemap, optimistic, optimisticLockEntries, otherNodeId, ownedVersion, ownsLock, ownsLockUnsafe, pessimistic, proxy, readCommitted, readExternal, readResolve, remainingTime, repeatableRead, replicated, resolveTaskName, serializable, sessionEnd, setRollbackOnly, size, startTime, state, state, state, storeEnabled, storeEnabled, storeUsed, subjectId, syncMode, syncMode, system, systemInvalidate, taskNameHash, threadId, timedOut, timeout, timeout, timeoutException, topologyVersion, topologyVersion, topologyVersionSnapshot, transactionNodes, transactionNodes, uncommit, updateNearCache, user, writeExternal, 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, readExternalMeta, removeAllMeta, removeMeta, removeMeta, replaceMeta, writeExternalMeta`

### 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.IgniteTxLocalEx

`finish`

### Methods inherited from interface org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx

`addInvalidPartition, addMeta, close, colocated, commitAsync, commitVersion, commitVersion, concurrency, currentPrepareFuture, dht, done, endVersion, errorWhenCommitting, finishFuture, hasTransforms, implicit, implicitSingle, internal, invalidate, invalidPartitions, ioPolicy, isInvalidate, isolation, isRollbackOnly, isSystemInvalidate, local, localResult, markFinalizing, markPreparing, meta, near, nearXidVersion, needsCompletedVersions, nodeId, onePhaseCommit, onRemap, optimistic, optimisticLockEntries, otherNodeId, ownedVersion, ownsLock, ownsLockUnsafe, pessimistic, prepareAsync, proxy, readCommitted, remainingTime, removeMeta, repeatableRead, replicated, rollback, rollbackAsync, serializable, setRollbackOnly, size, startTime, state, state, storeEnabled, storeUsed, subjectId, syncMode, system, systemInvalidate, taskNameHash, threadId, timedOut, timeout, timeout, topologyVersion, topologyVersion, topologyVersionSnapshot, transactionNodes, user, writeVersion, writeVersion, xid, xidVersion`

### Field Detail

#### COMMIT_ERR_UPD

    protected static final AtomicReferenceFieldUpdater<IgniteTxLocalAdapter,Throwable> COMMIT_ERR_UPD

Commit error updater.

#### DONE_FLAG_UPD

    protected static final AtomicIntegerFieldUpdater<IgniteTxLocalAdapter> DONE_FLAG_UPD

Done flag updater.

#### minVer

    protected GridCacheVersion minVer

Minimal version encountered (either explicit lock or XID of this transaction).

#### doneFlag

    protected volatile int doneFlag

Flag indicating with TM commit happened.

#### commitErr

    protected volatile Throwable commitErr

Commit error.

#### implicitRes

    protected GridCacheReturn implicitRes

Implicit transaction result.

#### txState

    @GridToStringInclude
    protected IgniteTxLocalState txState

### Constructor Detail

#### IgniteTxLocalAdapter

    protected IgniteTxLocalAdapter()

Empty constructor required for `Externalizable`.

#### IgniteTxLocalAdapter

    protected IgniteTxLocalAdapter(GridCacheSharedContext cctx,
                        GridCacheVersion xidVer,
                        boolean implicit,
                        boolean implicitSingle,
                        boolean sys,
                        byte plc,
                        TransactionConcurrency concurrency,
                        TransactionIsolation isolation,
                        long timeout,
                        boolean invalidate,
                        boolean storeEnabled,
                        boolean onePhaseCommit,
                        int txSize,
                        @Nullable
                        UUID subjId,
                        int taskNameHash)

Parameters:
  `cctx` - Cache registry.
  `xidVer` - Transaction ID.
  `implicit` - `True` if transaction was implicitly started by the system, `false` if it was started explicitly by user.
  `implicitSingle` - `True` if transaction is implicit with only one key.
  `sys` - System flag.
  `plc` - IO policy.
  `concurrency` - Concurrency.
  `isolation` - Isolation.
  `timeout` - Timeout.
  `txSize` - Expected transaction size.

### Method Detail

#### txState

    public IgniteTxState txState()

Specified by:
  `txState` in interface `IgniteInternalTx`
Returns:
  Transaction state.

#### initResult

    protected void initResult()

Creates result instance.

#### eventNodeId

    public UUID eventNodeId()

Specified by:
  `eventNodeId` in interface `IgniteInternalTx`
Returns:
  Event node ID.

#### originatingNodeId

    public UUID originatingNodeId()

Gets node ID which directly started this transaction. In case of DHT local transaction it will be near node ID, in case of DHT remote transaction it will be primary node ID.

Specified by:
  `originatingNodeId` in interface `IgniteInternalTx`
Returns:
  Originating node ID.

#### empty

    public boolean empty()

Specified by:
  `empty` in interface `IgniteInternalTx`
Returns:
  `True` if transaction is empty.

#### masterNodeIds

    public Collection<UUID> masterNodeIds()

Specified by:
  `masterNodeIds` in interface `IgniteInternalTx`
Returns:
  Master node IDs.

#### commitError

    public Throwable commitError()

Specified by:
  `commitError` in interface `IgniteTxLocalEx`
Returns:
  Commit error.

#### commitError

    public void commitError(Throwable e)

Specified by:
  `commitError` in interface `IgniteInternalTx`
Parameters:
  `e` - Commit error.

#### onOwnerChanged

    public boolean onOwnerChanged(GridCacheEntryEx entry,
                         GridCacheMvccCandidate owner)

Callback invoked whenever there is a lock that has been acquired by this transaction for any of the participating entries.

Specified by:
  `onOwnerChanged` in interface `IgniteInternalTx`
Parameters:
  `entry` - Cache entry.
  `owner` - Lock candidate that won ownership of the lock.
Returns:
  `True` if transaction cared about notification.

#### activeCachesDeploymentEnabled

    public boolean activeCachesDeploymentEnabled()

Specified by:
  `activeCachesDeploymentEnabled` in interface `IgniteInternalTx`
Returns:
  `true` or `false` if the deployment is enabled or disabled for all active caches involved in this transaction.

#### activeCachesDeploymentEnabled

    public void activeCachesDeploymentEnabled(boolean depEnabled)

Parameters:
  `depEnabled` - Flag indicating whether deployment is enabled for caches from this transaction or not.

#### isStarted

    public boolean isStarted()

Specified by:
  `isStarted` in class `IgniteTxAdapter`
Returns:
  `True` if transaction has at least one key enlisted.

#### hasWriteKey

    public boolean hasWriteKey(IgniteTxKey key)

Specified by:
  `hasWriteKey` in interface `IgniteInternalTx`
Parameters:
  `key` - Key to check.
Returns:
  `True` if key is present.

#### readSet

    public Set<IgniteTxKey> readSet()

Specified by:
  `readSet` in interface `IgniteInternalTx`
Returns:
  Transaction read set.

#### writeSet

    public Set<IgniteTxKey> writeSet()

Specified by:
  `writeSet` in interface `IgniteInternalTx`
Returns:
  Transaction write set.

#### readMap

    public Map<IgniteTxKey,IgniteTxEntry> readMap()

Specified by:
  `readMap` in interface `IgniteInternalTx`
Returns:
  Transaction read map.

#### writeMap

    public Map<IgniteTxKey,IgniteTxEntry> writeMap()

Specified by:
  `writeMap` in interface `IgniteInternalTx`
Returns:
  Transaction write map.

#### allEntries

    public Collection<IgniteTxEntry> allEntries()

Specified by:
  `allEntries` in interface `IgniteInternalTx`
Returns:
  All transaction entries.

#### readEntries

    public Collection<IgniteTxEntry> readEntries()

Specified by:
  `readEntries` in interface `IgniteInternalTx`
Returns:
  Read entries.

#### writeEntries

    public Collection<IgniteTxEntry> writeEntries()

Specified by:
  `writeEntries` in interface `IgniteInternalTx`
Returns:
  Write entries.

#### entry

    @Nullable
    public IgniteTxEntry entry(IgniteTxKey key)

Specified by:
  `entry` in interface `IgniteInternalTx`
Parameters:
  `key` - Key for the entry.
Returns:
  Entry for the key (either from write set or read set).

#### seal

    public void seal()

Seals transaction for updates.

Specified by:
  `seal` in interface `IgniteInternalTx`

#### implicitSingleResult

    public void implicitSingleResult(GridCacheReturn ret)

Parameters:
  `ret` - Result.

#### hasInterceptor

    public boolean hasInterceptor()

Returns:
  `True` if transaction participates in a cache that has an interceptor configured.

#### sendTransformedValues

    public void sendTransformedValues(boolean snd)

Parameters:
  `snd` - `True` if values in tx entries should be replaced with transformed values and sent to remote nodes.

#### commitAfterLock

    protected boolean commitAfterLock()

Returns:
  `True` if should be committed after lock is acquired.

#### peek

    @Nullable
    public GridTuple<CacheObject> peek(GridCacheContext cacheCtx,
                                       boolean failFast,
                                       KeyCacheObject key)
                                throws GridCacheFilterFailedException

Specified by:
  `peek` in interface `IgniteInternalTx`
Parameters:
  `cacheCtx` - Cache context.
  `failFast` - Fail-fast flag.
  `key` - Key to look up.
Returns:
  Current value for the key within transaction.
Throws:
  `GridCacheFilterFailedException` - If filter failed and failFast is `true`.

#### loadMissing

    public IgniteInternalFuture<Void> loadMissing(GridCacheContext cacheCtx,
                                         AffinityTopologyVersion topVer,
                                         boolean readThrough,
                                         boolean async,
                                         Collection<KeyCacheObject> keys,
                                         boolean skipVals,
                                         boolean needVer,
                                         boolean keepBinary,
                                         GridInClosure3<KeyCacheObject,Object,GridCacheVersion> c)

Specified by:
  `loadMissing` in interface `IgniteTxLocalEx`
Parameters:
  `cacheCtx` - Cache context.
  `readThrough` - Read through flag.
  `async` - if `True`, then loading will happen in a separate thread.
  `keys` - Keys.
  `skipVals` - Skip values flag.
  `needVer` - If `true` version is required for loaded values.
  `c` - Closure to be applied for loaded values.
Returns:
  Future with `True` value if loading took place.

#### minVersion

    public GridCacheVersion minVersion()

Gets minimum version present in transaction.

Specified by:
  `minVersion` in interface `IgniteTxLocalEx`
Returns:
  Minimum versions.

#### userPrepare

    public void userPrepare()
                     throws IgniteCheckedException

Throws:
  `IgniteCheckedException` - If prepare step failed.

#### commit

    public void commit()
                throws IgniteCheckedException

Commits this transaction by initiating `two-phase-commit` process.

Specified by:
  `commit` in interface `IgniteInternalTx`
Throws:
  `IgniteCheckedException` - If commit failed.

#### prepare

    public void prepare()
                 throws IgniteCheckedException

Prepare state.

Specified by:
  `prepare` in interface `IgniteInternalTx`
Throws:
  `IgniteCheckedException` - If failed.

#### entryEx

    protected GridCacheEntryEx entryEx(GridCacheContext cacheCtx,
                           IgniteTxKey key)

Gets cache entry for given key.

Parameters:
  `cacheCtx` - Cache context.
  `key` - Key.
Returns:
  Cache entry.

#### entryEx

    protected GridCacheEntryEx entryEx(GridCacheContext cacheCtx,
                           IgniteTxKey key,
                           AffinityTopologyVersion topVer)

Gets cache entry for given key and topology version.

Parameters:
  `cacheCtx` - Cache context.
  `key` - Key.
  `topVer` - Topology version.
Returns:
  Cache entry.

#### userCommit

    public void userCommit()
                    throws IgniteCheckedException

Specified by:
  `userCommit` in interface `IgniteTxLocalEx`
Throws:
  `IgniteCheckedException` - If commit failed.

#### tmFinish

    public void tmFinish(boolean commit)

Commits transaction to transaction manager. Used for one-phase commit transactions only.

Parameters:
  `commit` - If `true` commits transaction, otherwise rollbacks.

#### completedVersions

    public void completedVersions(GridCacheVersion completedBase,
                         Collection<GridCacheVersion> committedVers,
                         Collection<GridCacheVersion> rolledbackVers)

Specified by:
  `completedVersions` in interface `IgniteInternalTx`
Overrides:
  `completedVersions` in class `IgniteTxAdapter`
Parameters:
  `completedBase` - Base for committed versions.
  `committedVers` - Committed transactions relative to base.
  `rolledbackVers` - Rolled back transactions relative to base.

#### completedBase

    public GridCacheVersion completedBase()

Returns:
  Completed base for ordering.

#### committedVersions

    public Collection<GridCacheVersion> committedVersions()

Returns:
  Committed versions.

#### rolledbackVersions

    public Collection<GridCacheVersion> rolledbackVersions()

Returns:
  Rolledback versions.

#### userRollback

    public void userRollback()
                      throws IgniteCheckedException

Specified by:
  `userRollback` in interface `IgniteTxLocalEx`
Throws:
  `IgniteCheckedException` - If rollback failed.

#### accessPolicy

    protected IgniteCacheExpiryPolicy accessPolicy(GridCacheContext ctx,
                                       IgniteTxKey key,
                                       @Nullable
                                       javax.cache.expiry.ExpiryPolicy expiryPlc)

Parameters:
  `ctx` - Cache context.
  `key` - Key.
  `expiryPlc` - Expiry policy.
Returns:
  Expiry policy wrapper for entries accessed locally in optimistic transaction.

#### accessPolicy

    protected IgniteCacheExpiryPolicy accessPolicy(GridCacheContext cacheCtx,
                                       Collection<KeyCacheObject> keys)

Parameters:
  `cacheCtx` - Cache context.
  `keys` - Keys.
Returns:
  Expiry policy.

#### getAllAsync

    public <K,V> IgniteInternalFuture<Map<K,V>> getAllAsync(GridCacheContext cacheCtx,
                                                   @Nullable
                                                   AffinityTopologyVersion entryTopVer,
                                                   Collection<KeyCacheObject> keys,
                                                   boolean deserializeBinary,
                                                   boolean skipVals,
                                                   boolean keepCacheObjects,
                                                   boolean skipStore,
                                                   boolean needVer)

Specified by:
  `getAllAsync` in interface `IgniteTxLocalEx`
Parameters:
  `cacheCtx` - Cache context.
  `keys` - Keys to get.
  `deserializeBinary` - Deserialize binary flag.
  `skipVals` - Skip values flag.
  `keepCacheObjects` - Keep cache objects
  `skipStore` - Skip store flag.
Returns:
  Future for this get.

#### putAllAsync

    public <K,V> IgniteInternalFuture<GridCacheReturn> putAllAsync(GridCacheContext cacheCtx,
                                                          @Nullable
                                                          AffinityTopologyVersion entryTopVer,
                                                          Map<? extends K,? extends V> map,
                                                          boolean retval)

Specified by:
  `putAllAsync` in interface `IgniteTxLocalEx`
Parameters:
  `cacheCtx` - Cache context.
  `map` - Map to put.
  `retval` - Flag indicating whether a value should be returned.
Returns:
  Future for put operation.

#### putAsync

    public <K,V> IgniteInternalFuture<GridCacheReturn> putAsync(GridCacheContext cacheCtx,
                                                       @Nullable
                                                       AffinityTopologyVersion entryTopVer,
                                                       K key,
                                                       V val,
                                                       boolean retval,
                                                       CacheEntryPredicate filter)

Specified by:
  `putAsync` in interface `IgniteTxLocalEx`
Parameters:
  `cacheCtx` - Cache context.
  `key` - Key.
  `val` - Value.
  `retval` - Return value flag.
  `filter` - Filter.
Returns:
  Future for put operation.

#### invokeAsync

    public <K,V> IgniteInternalFuture<GridCacheReturn> invokeAsync(GridCacheContext cacheCtx,
                                                          @Nullable
                                                          AffinityTopologyVersion entryTopVer,
                                                          K key,
                                                          javax.cache.processor.EntryProcessor<K,V,Object> entryProcessor,
                                                          Object... invokeArgs)

Specified by:
  `invokeAsync` in interface `IgniteTxLocalEx`
Parameters:
  `cacheCtx` - Cache context.
  `key` - Key.
  `entryProcessor` - Entry processor.
  `invokeArgs` - Optional arguments for entry processor.
Returns:
  Operation future.

#### putAllDrAsync

    public IgniteInternalFuture<?> putAllDrAsync(GridCacheContext cacheCtx,
                                        Map<KeyCacheObject,GridCacheDrInfo> drMap)

Specified by:
  `putAllDrAsync` in interface `IgniteTxLocalEx`
Parameters:
  `cacheCtx` - Cache context.
  `drMap` - DR map to put.
Returns:
  Future for DR put operation.

#### invokeAsync

    public <K,V,T> IgniteInternalFuture<GridCacheReturn> invokeAsync(GridCacheContext cacheCtx,
                                                            @Nullable
                                                            AffinityTopologyVersion entryTopVer,
                                                            @Nullable
                                                            Map<? extends K,? extends javax.cache.processor.EntryProcessor<K,V,Object>> map,
                                                            Object... invokeArgs)

Specified by:
  `invokeAsync` in interface `IgniteTxLocalEx`
Parameters:
  `cacheCtx` - Cache context.
  `map` - Entry processors map.
  `invokeArgs` - Optional arguments for entry processor.
Returns:
  Operation future.

#### removeAllDrAsync

    public IgniteInternalFuture<?> removeAllDrAsync(GridCacheContext cacheCtx,
                                           Map<KeyCacheObject,GridCacheVersion> drMap)

Specified by:
  `removeAllDrAsync` in interface `IgniteTxLocalEx`
Parameters:
  `cacheCtx` - Cache context.
  `drMap` - DR map.
Returns:
  Future for asynchronous remove.

#### postLockWrite

    protected final void postLockWrite(GridCacheContext cacheCtx,
                     Iterable<KeyCacheObject> keys,
                     GridCacheReturn ret,
                     boolean rmv,
                     boolean retval,
                     boolean read,
                     long accessTtl,
                     CacheEntryPredicate[] filter,
                     boolean computeInvoke)
                                throws IgniteCheckedException

Post lock processing for put or remove.

Parameters:
  `cacheCtx` - Context.
  `keys` - Keys.
  `ret` - Return value.
  `rmv` - `True` if remove.
  `retval` - Flag to return value or not.
  `read` - `True` if read.
  `accessTtl` - TTL for read operation.
  `filter` - Filter to check entries.
  `computeInvoke` - If `true` computes return value for invoke operation.
Throws:
  `IgniteCheckedException` - If error.

#### removeAllAsync

    public <K,V> IgniteInternalFuture<GridCacheReturn> removeAllAsync(GridCacheContext cacheCtx,
                                                             @Nullable
                                                             AffinityTopologyVersion entryTopVer,
                                                             Collection<? extends K> keys,
                                                             boolean retval,
                                                             CacheEntryPredicate filter,
                                                             boolean singleRmv)

Specified by:
  `removeAllAsync` in interface `IgniteTxLocalEx`
Parameters:
  `cacheCtx` - Cache context.
  `keys` - Keys to remove.
  `retval` - Flag indicating whether a value should be returned.
  `filter` - Filter.
  `singleRmv` - `True` for single key remove operation (`Cache.remove(Object)`.
Returns:
  Future for asynchronous remove.

#### init

    public boolean init()

Initializes read map.

Returns:
  `True` if transaction was successfully started.

#### addActiveCache

    protected final void addActiveCache(GridCacheContext cacheCtx)
                                 throws IgniteCheckedException

Adds cache to the list of active caches in transaction.

Parameters:
  `cacheCtx` - Cache context to add.
Throws:
  `IgniteCheckedException` - If caches already enlisted in this transaction are not compatible with given cache (e.g. they have different stores).

#### checkValid

    protected void checkValid()
                       throws IgniteCheckedException

Checks transaction expiration.

Throws:
  `IgniteCheckedException` - If transaction check failed.

#### alternateVersions

    public Collection<GridCacheVersion> alternateVersions()

Specified by:
  `alternateVersions` in interface `IgniteInternalTx`
Returns:
  Alternate transaction versions.

#### addEntry

    protected final IgniteTxEntry addEntry(GridCacheOperation op,
                         @Nullable
                         CacheObject val,
                         @Nullable
                         javax.cache.processor.EntryProcessor entryProcessor,
                         Object[] invokeArgs,
                         GridCacheEntryEx entry,
                         @Nullable
                         javax.cache.expiry.ExpiryPolicy expiryPlc,
                         CacheEntryPredicate[] filter,
                         boolean filtersSet,
                         long drTtl,
                         long drExpireTime,
                         @Nullable
                         GridCacheVersion drVer,
                         boolean skipStore,
                         boolean keepBinary)

Parameters:
  `op` - Cache operation.
  `val` - Value.
  `expiryPlc` - Explicitly specified expiry policy.
  `invokeArgs` - Optional arguments for EntryProcessor.
  `entryProcessor` - Entry processor.
  `entry` - Cache entry.
  `filter` - Filter.
  `filtersSet` - `True` if filter should be marked as set.
  `drTtl` - DR TTL (if any).
  `drExpireTime` - DR expire time (if any).
  `drVer` - DR version.
  `skipStore` - Skip store flag.
Returns:
  Transaction entry.

#### updateExplicitVersion

    protected void updateExplicitVersion(IgniteTxEntry txEntry,
                             GridCacheEntryEx entry)
                                  throws GridCacheEntryRemovedException

Updates explicit version for tx entry based on current entry lock owner.

Parameters:
  `txEntry` - Tx entry to update.
  `entry` - Entry.
Throws:
  `GridCacheEntryRemovedException` - If entry was concurrently removed.

#### toString

    public String toString()

Overrides:
  `toString` in class `IgniteTxAdapter`

#### entryTtl

    public long entryTtl(IgniteTxKey key)

Parameters:
  `key` - Key.
Returns:
  Tx entry time to live.

#### entryExpireTime

    public long entryExpireTime(IgniteTxKey key)

Parameters:
  `key` - Key.
Returns:
  Tx entry expire time.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.8.0
Release Date | : December 5 2016