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

## Interface IgniteTxLocalEx

All Superinterfaces:
  AutoCloseable, GridTimeoutObject, IgniteInternalTx

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

    public interface IgniteTxLocalEx
    extends IgniteInternalTx

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).
`<K,V> IgniteInternalFuture<Map<K,V>>` `getAllAsync(GridCacheContext cacheCtx, Collection<KeyCacheObject> keys, GridCacheEntryEx cached, boolean deserializePortable, boolean skipVals, boolean keepCacheObjects)`
`<K> IgniteInternalFuture<?>` `groupLockAsync(GridCacheContext cacheCtx, Collection<K> keys)` Performs keys locking for affinity-based group lock transactions.
`IgniteTxEntry` `groupLockEntry()`
`GridCacheReturn` `implicitSingleResult()`
`<K,V,T> IgniteInternalFuture<GridCacheReturn>` `invokeAsync(GridCacheContext cacheCtx, Map<? extends K,? extends javax.cache.processor.EntryProcessor<K,V,Object>> map, Object... invokeArgs)`
`IgniteInternalFuture<Boolean>` `loadMissing(GridCacheContext cacheCtx, boolean readThrough, boolean async, Collection<KeyCacheObject> keys, boolean deserializePortable, boolean skipVals, IgniteBiInClosure<KeyCacheObject,Object> c)`
`GridCacheVersion` `minVersion()`
`boolean` `partitionLock()`
`<K,V> IgniteInternalFuture<GridCacheReturn>` `putAllAsync(GridCacheContext cacheCtx, Map<? extends K,? extends V> map, boolean retval, GridCacheEntryEx cached, long ttl, CacheEntryPredicate[] filter)`
`IgniteInternalFuture<?>` `putAllDrAsync(GridCacheContext cacheCtx, Map<KeyCacheObject,GridCacheDrInfo> drMap)`
`<K,V> IgniteInternalFuture<GridCacheReturn>` `removeAllAsync(GridCacheContext cacheCtx, Collection<? extends K> keys, GridCacheEntryEx cached, boolean retval, CacheEntryPredicate[] filter)`
`IgniteInternalFuture<?>` `removeAllDrAsync(GridCacheContext cacheCtx, Map<KeyCacheObject,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, localResult, 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 groupLockEntry()

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

#### getAllAsync

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

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.
  `skipVals` - Skip values flag.
  `keepCacheObjects` - Keep cache objects
Returns:
  Future for this get.

#### putAllAsync

    <K,V> IgniteInternalFuture<GridCacheReturn> putAllAsync(GridCacheContext cacheCtx,
                                                          Map<? extends K,? extends V> map,
                                                          boolean retval,
                                                          @Nullable
                                                          GridCacheEntryEx cached,
                                                          long ttl,
                                                          CacheEntryPredicate[] 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

    <K,V,T> IgniteInternalFuture<GridCacheReturn> invokeAsync(GridCacheContext 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

    <K,V> IgniteInternalFuture<GridCacheReturn> removeAllAsync(GridCacheContext cacheCtx,
                                                             Collection<? extends K> keys,
                                                             @Nullable
                                                             GridCacheEntryEx cached,
                                                             boolean retval,
                                                             CacheEntryPredicate[] 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 cacheCtx,
                                        Map<KeyCacheObject,GridCacheDrInfo> drMap)

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

#### removeAllDrAsync

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

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

#### groupLockAsync

    <K> IgniteInternalFuture<?> groupLockAsync(GridCacheContext 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 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 cacheCtx,
                                            boolean readThrough,
                                            boolean async,
                                            Collection<KeyCacheObject> keys,
                                            boolean deserializePortable,
                                            boolean skipVals,
                                            IgniteBiInClosure<KeyCacheObject,Object> 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-RC3
Release Date | : March 24 2015