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

## Interface IgniteTxLocalEx<K,V>

All Superinterfaces:
  AutoCloseable, GridTimeoutObject, IgniteInternalTx<K,V>

All Known Implementing Classes:
  GridDhtTxLocal, GridDhtTxLocalAdapter, GridNearTxLocal, IgniteTxLocalAdapter

    public interface IgniteTxLocalEx<K,V>
    extends IgniteInternalTx<K,V>

Local transaction API.

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx

`IgniteInternalTx.FinalizationStatus`

### Method Summary

Methods
`Throwable` `commitError()`
`void` `commitError(Throwable e)`
`boolean` `finish(boolean commit)` Finishes transaction (either commit or rollback).
`IgniteInternalFuture<Map<K,V>>` `getAllAsync(GridCacheContext<K,V> cacheCtx, Collection<? extends K> keys, GridCacheEntryEx<K,V> cached, boolean deserializePortable, boolean skipVals)`
`IgniteInternalFuture<?>` `groupLockAsync(GridCacheContext<K,V> cacheCtx, Collection<K> keys)` Performs keys locking for affinity-based group lock transactions.
`IgniteTxEntry<K,V>` `groupLockEntry()`
`GridCacheReturn<V>` `implicitSingleResult()`
`<T> IgniteInternalFuture<GridCacheReturn<Map<K,javax.cache.processor.EntryProcessorResult<T>>>>` `invokeAsync(GridCacheContext<K,V> cacheCtx, Map<? extends K,? extends javax.cache.processor.EntryProcessor<K,V,Object>> map, Object... invokeArgs)`
`IgniteInternalFuture<Boolean>` `loadMissing(GridCacheContext<K,V> cacheCtx, boolean readThrough, boolean async, Collection<? extends K> keys, boolean deserializePortable, boolean skipVals, IgniteBiInClosure<K,V> c)`
`GridCacheVersion` `minVersion()`
`boolean` `partitionLock()`
`IgniteInternalFuture<GridCacheReturn<V>>` `putAllAsync(GridCacheContext<K,V> cacheCtx, Map<? extends K,? extends V> map, boolean retval, GridCacheEntryEx<K,V> cached, long ttl, IgnitePredicate<javax.cache.Cache.Entry<K,V>>[] filter)`
`IgniteInternalFuture<?>` `putAllDrAsync(GridCacheContext<K,V> cacheCtx, Map<? extends K,GridCacheDrInfo<V>> drMap)`
`IgniteInternalFuture<GridCacheReturn<V>>` `removeAllAsync(GridCacheContext<K,V> cacheCtx, Collection<? extends K> keys, GridCacheEntryEx<K,V> cached, boolean retval, IgnitePredicate<javax.cache.Cache.Entry<K,V>>[] filter)`
`IgniteInternalFuture<?>` `removeAllDrAsync(GridCacheContext<K,V> cacheCtx, Map<? extends K,GridCacheVersion> drMap)`
`void` `userCommit()`
`void` `userRollback()`

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

`activeCacheIds, addInvalidPartition, addMeta, allEntries, alternateVersions, close, colocated, commit, commitAsync, commitVersion, commitVersion, completedVersions, concurrency, dht, done, empty, endVersion, endVersion, enforceSerializable, entry, eventNodeId, finishFuture, groupLock, groupLockKey, hasTransforms, hasWriteKey, implicit, implicitSingle, internal, invalidate, invalidPartitions, ioPolicy, isInvalidate, isolation, isRollbackOnly, isSystemInvalidate, local, markFinalizing, markPreparing, masterNodeIds, meta, near, nearXidVersion, needsCompletedVersions, nodeId, onePhaseCommit, onOwnerChanged, optimistic, optimisticLockEntries, originatingNodeId, otherNodeId, ownedVersion, ownsLock, ownsLockUnsafe, peek, pessimistic, prepare, prepareAsync, proxy, readCommitted, readEntries, readMap, readSet, remainingTime, removed, removeMeta, repeatableRead, replicated, rollback, rollbackAsync, seal, serializable, setRollbackOnly, size, startTime, startVersion, state, state, storeEnabled, storeUsed, subjectId, syncCommit, syncRollback, system, systemInvalidate, taskNameHash, threadId, timedOut, timeout, timeout, topologyVersion, topologyVersion, transactionNodes, user, writeEntries, writeMap, writeSet, writeVersion, writeVersion, xid, xidVersion`

### Methods inherited from interface org.apache.ignite.internal.processors.timeout.GridTimeoutObject

`endTime, onTimeout, timeoutId`

### Method Detail

#### minVersion

    GridCacheVersion minVersion()

Returns:
  Minimum version involved in transaction.

#### commitError

    @Nullable
    Throwable commitError()

Returns:
  Commit error.

#### commitError

    void commitError(Throwable e)

Parameters:
  `e` - Commit error.

#### userCommit

    void userCommit()
                    throws IgniteCheckedException

Throws:
  `IgniteCheckedException` - If commit failed.

#### userRollback

    void userRollback()
                      throws IgniteCheckedException

Throws:
  `IgniteCheckedException` - If rollback failed.

#### groupLockEntry

    @Nullable
    IgniteTxEntry<K,V> groupLockEntry()

Returns:
  Group lock entry if this is a group-lock transaction.

#### getAllAsync

    IgniteInternalFuture<Map<K,V>> getAllAsync(GridCacheContext<K,V> cacheCtx,
                                             Collection<? extends K> keys,
                                             @Nullable
                                             GridCacheEntryEx<K,V> cached,
                                             boolean deserializePortable,
                                             boolean skipVals)

Parameters:
  `cacheCtx` - Cache context.
  `keys` - Keys to get.
  `cached` - Cached entry if this method is called from entry wrapper. Cached entry is passed if and only if there is only one key in collection of keys.
  `deserializePortable` - Deserialize portable flag.
Returns:
  Future for this get.

#### putAllAsync

    IgniteInternalFuture<GridCacheReturn<V>> putAllAsync(GridCacheContext<K,V> cacheCtx,
                                                       Map<? extends K,? extends V> map,
                                                       boolean retval,
                                                       @Nullable
                                                       GridCacheEntryEx<K,V> cached,
                                                       long ttl,
                                                       IgnitePredicate<javax.cache.Cache.Entry<K,V>>[] filter)

Parameters:
  `cacheCtx` - Cache context.
  `map` - Map to put.
  `retval` - Flag indicating whether a value should be returned.
  `cached` - Cached entry, if any. Will be provided only if map has size 1.
  `filter` - Filter.
  `ttl` - Time to live for entry. If negative, leave unchanged.
Returns:
  Future for put operation.

#### invokeAsync

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

Parameters:
  `cacheCtx` - Cache context.
  `map` - Entry processors map.
  `invokeArgs` - Optional arguments for entry processor.
Returns:
  Transform operation future.

#### removeAllAsync

    IgniteInternalFuture<GridCacheReturn<V>> removeAllAsync(GridCacheContext<K,V> cacheCtx,
                                                          Collection<? extends K> keys,
                                                          @Nullable
                                                          GridCacheEntryEx<K,V> cached,
                                                          boolean retval,
                                                          IgnitePredicate<javax.cache.Cache.Entry<K,V>>[] filter)

Parameters:
  `cacheCtx` - Cache context.
  `keys` - Keys to remove.
  `retval` - Flag indicating whether a value should be returned.
  `cached` - Cached entry, if any. Will be provided only if size of keys collection is 1.
  `filter` - Filter.
Returns:
  Future for asynchronous remove.

#### putAllDrAsync

    IgniteInternalFuture<?> putAllDrAsync(GridCacheContext<K,V> cacheCtx,
                                        Map<? extends K,GridCacheDrInfo<V>> drMap)

Parameters:
  `cacheCtx` - Cache context.
  `drMap` - DR map to put.
Returns:
  Future for DR put operation.

#### removeAllDrAsync

    IgniteInternalFuture<?> removeAllDrAsync(GridCacheContext<K,V> cacheCtx,
                                           Map<? extends K,GridCacheVersion> drMap)

Parameters:
  `cacheCtx` - Cache context.
  `drMap` - DR map.
Returns:
  Future for asynchronous remove.

#### groupLockAsync

    IgniteInternalFuture<?> groupLockAsync(GridCacheContext<K,V> cacheCtx,
                                         Collection<K> keys)

Performs keys locking for affinity-based group lock transactions.

Parameters:
  `cacheCtx` - Cache context.
  `keys` - Keys to lock.
Returns:
  Lock future.

#### partitionLock

    boolean partitionLock()

Returns:
  `True` if keys from the same partition are allowed to be enlisted in group-lock transaction.

#### implicitSingleResult

    GridCacheReturn<V> implicitSingleResult()

Returns:
  Return value for

#### finish

    boolean finish(boolean commit)
                   throws IgniteCheckedException

Finishes transaction (either commit or rollback).

Parameters:
  `commit` - `True` if commit, `false` if rollback.
Returns:
  `True` if state has been changed.
Throws:
  `IgniteCheckedException` - If finish failed.

#### loadMissing

    IgniteInternalFuture<Boolean> loadMissing(GridCacheContext<K,V> cacheCtx,
                                            boolean readThrough,
                                            boolean async,
                                            Collection<? extends K> keys,
                                            boolean deserializePortable,
                                            boolean skipVals,
                                            IgniteBiInClosure<K,V> c)

Parameters:
  `cacheCtx` - Cache context.
  `readThrough` - Read through flag.
  `async` - if `True`, then loading will happen in a separate thread.
  `keys` - Keys.
  `c` - Closure.
  `deserializePortable` - Deserialize portable flag.
  `skipVals` - Skip values flag.
Returns:
  Future with `True` value if loading took place.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0-RC1
Release Date | : February 17 2015