org.apache.ignite.internal.processors.cache.distributed

## Class GridCacheTxRecoveryFuture

- java.lang.Object
- - java.util.concurrent.locks.AbstractOwnableSynchronizer
  - - java.util.concurrent.locks.AbstractQueuedSynchronizer
    - - org.apache.ignite.internal.util.future.GridFutureAdapter<R>
      - - org.apache.ignite.internal.util.future.GridCompoundFuture<T,T>
        - - org.apache.ignite.internal.util.future.GridCompoundIdentityFuture<Boolean>
          - - org.apache.ignite.internal.processors.cache.distributed.GridCacheTxRecoveryFuture

All Implemented Interfaces:
  Serializable, IgniteInternalFuture<Boolean>, GridCacheFuture<Boolean>

    public class GridCacheTxRecoveryFuture
    extends GridCompoundIdentityFuture<Boolean>
    implements GridCacheFuture<Boolean>

Future verifying that all remote transactions related to transaction were prepared or committed.

See Also:
  Serialized Form

### Nested Class Summary

### Nested classes/interfaces inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizer

`AbstractQueuedSynchronizer.ConditionObject`

### Constructor Summary

Constructors
Constructor and Description
`GridCacheTxRecoveryFuture(GridCacheSharedContext<?,?> cctx, IgniteInternalTx tx, UUID failedNodeId, Map<UUID,Collection<UUID>> txNodes)`

### Method Summary

Methods
`IgniteUuid` `futureId()`
`void` `markNotTrackable()` Marks this future as non-trackable.
`Collection<? extends ClusterNode>` `nodes()`
`boolean` `onDone(Boolean res, Throwable err)` Callback to notify that future is finished.
`boolean` `onNodeLeft(UUID nodeId)` Callback for when node left.
`void` `onResult(UUID nodeId, GridCacheTxRecoveryResponse res)`
`void` `prepare()` Initializes future.
`String` `toString()`
`boolean` `trackable()`
`GridCacheVersion` `version()`

### Methods inherited from class org.apache.ignite.internal.util.future.GridCompoundFuture

`add, addAll, addAll, cancel, futures, hasPending, ignoreChildFailures, initialized, markInitialized, pending, reducer, reducer`

### Methods inherited from class org.apache.ignite.internal.util.future.GridFutureAdapter

`chain, duration, endTime, error, get, get, get, get0, getUninterruptibly, ignoreInterrupts, isCancelled, isDone, isFailed, listen, onCancelled, onDone, onDone, onDone, result, startTime, tryAcquireShared, tryReleaseShared`

### Methods inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizer

`acquire, acquireInterruptibly, acquireShared, acquireSharedInterruptibly, compareAndSetState, getExclusiveQueuedThreads, getFirstQueuedThread, getQueuedThreads, getQueueLength, getSharedQueuedThreads, getState, getWaitingThreads, getWaitQueueLength, hasContended, hasQueuedPredecessors, hasQueuedThreads, hasWaiters, isHeldExclusively, isQueued, owns, release, releaseShared, setState, tryAcquire, tryAcquireNanos, tryAcquireSharedNanos, tryRelease`

### Methods inherited from class java.util.concurrent.locks.AbstractOwnableSynchronizer

`getExclusiveOwnerThread, setExclusiveOwnerThread`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.apache.ignite.internal.IgniteInternalFuture

`cancel, chain, duration, error, get, get, get, getUninterruptibly, isCancelled, isDone, listen, result, startTime`

### Constructor Detail

#### GridCacheTxRecoveryFuture

    public GridCacheTxRecoveryFuture(GridCacheSharedContext<?,?> cctx,
                             IgniteInternalTx tx,
                             UUID failedNodeId,
                             Map<UUID,Collection<UUID>> txNodes)

Parameters:
  `cctx` - Context.
  `tx` - Transaction.
  `failedNodeId` - ID of failed node started transaction.
  `txNodes` - Transaction mapping.

### Method Detail

#### prepare

    public void prepare()

Initializes future.

#### onResult

    public void onResult(UUID nodeId,
                GridCacheTxRecoveryResponse res)

Parameters:
  `nodeId` - Node ID.
  `res` - Response.

#### futureId

    public IgniteUuid futureId()

Specified by:
  `futureId` in interface `GridCacheFuture<Boolean>`
Returns:
  Unique identifier for this future.

#### version

    public GridCacheVersion version()

Specified by:
  `version` in interface `GridCacheFuture<Boolean>`
Returns:
  Future version.

#### nodes

    public Collection<? extends ClusterNode> nodes()

Specified by:
  `nodes` in interface `GridCacheFuture<Boolean>`
Returns:
  Involved nodes.

#### onNodeLeft

    public boolean onNodeLeft(UUID nodeId)

Callback for when node left.

Specified by:
  `onNodeLeft` in interface `GridCacheFuture<Boolean>`
Parameters:
  `nodeId` - Left node ID.
Returns:
  `True` if future cared about this node.

#### trackable

    public boolean trackable()

Specified by:
  `trackable` in interface `GridCacheFuture<Boolean>`
Returns:
  `True` if future should be tracked.

#### markNotTrackable

    public void markNotTrackable()

Marks this future as non-trackable.

Specified by:
  `markNotTrackable` in interface `GridCacheFuture<Boolean>`

#### onDone

    public boolean onDone(@Nullable
                 Boolean res,
                 @Nullable
                 Throwable err)

Callback to notify that future is finished. Note that if non-`null` exception is passed in the result value will be ignored.

Overrides:
  `onDone` in class `GridFutureAdapter<Boolean>`
Parameters:
  `res` - Optional result.
  `err` - Optional error.
Returns:
  `True` if result was set by this call.

#### toString

    public String toString()

Overrides:
  `toString` in class `GridCompoundIdentityFuture<Boolean>`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.4.0
Release Date | : September 24 2015