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

## Class GridDhtGetFuture<K,V>

- 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<Collection<GridCacheEntryInfo>>
          - - org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtGetFuture<K,V>

All Implemented Interfaces:
  Serializable, IgniteInternalFuture<Collection<GridCacheEntryInfo>>, GridDhtFuture<Collection<GridCacheEntryInfo>>

    public final class GridDhtGetFuture<K,V>
    extends GridCompoundIdentityFuture<Collection<GridCacheEntryInfo>>
    implements GridDhtFuture<Collection<GridCacheEntryInfo>>

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
`GridDhtGetFuture(GridCacheContext<K,V> cctx, long msgId, UUID reader, LinkedHashMap<KeyCacheObject,Boolean> keys, boolean readThrough, boolean reload, IgniteTxLocalEx tx, AffinityTopologyVersion topVer, UUID subjId, int taskNameHash, IgniteCacheExpiryPolicy expiryPlc, boolean skipVals)`

### Method Summary

Methods
`IgniteUuid` `futureId()`
`Collection<Integer>` `invalidPartitions()` Node that future should be able to provide keys to retry before it completes, so it's not necessary to wait till future is done to get retry keys.
`boolean` `onDone(Collection<GridCacheEntryInfo> res, Throwable err)` Callback to notify that future is finished.
`GridCacheVersion` `version()`

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

`toString`

### 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, 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, isCancelled, isDone, listen, result, startTime`

### Constructor Detail

#### GridDhtGetFuture

    public GridDhtGetFuture(GridCacheContext<K,V> cctx,
                    long msgId,
                    UUID reader,
                    LinkedHashMap<KeyCacheObject,Boolean> keys,
                    boolean readThrough,
                    boolean reload,
                    @Nullable
                    IgniteTxLocalEx tx,
                    @NotNull
                    AffinityTopologyVersion topVer,
                    @Nullable
                    UUID subjId,
                    int taskNameHash,
                    @Nullable
                    IgniteCacheExpiryPolicy expiryPlc,
                    boolean skipVals)

Parameters:
  `cctx` - Context.
  `msgId` - Message ID.
  `reader` - Reader.
  `keys` - Keys.
  `readThrough` - Read through flag.
  `reload` - Reload flag.
  `tx` - Transaction.
  `topVer` - Topology version.
  `subjId` - Subject ID.
  `taskNameHash` - Task name hash code.
  `expiryPlc` - Expiry policy.
  `skipVals` - Skip values flag.

### Method Detail

#### invalidPartitions

    public Collection<Integer> invalidPartitions()

Node that future should be able to provide keys to retry before it completes, so it's not necessary to wait till future is done to get retry keys.

Specified by:
  `invalidPartitions` in interface `GridDhtFuture<Collection<GridCacheEntryInfo>>`
Returns:
  Keys to retry because this node is no longer a primary or backup.

#### futureId

    public IgniteUuid futureId()

Returns:
  Future ID.

#### version

    public GridCacheVersion version()

Returns:
  Future version.

#### onDone

    public boolean onDone(Collection<GridCacheEntryInfo> res,
                 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<Collection<GridCacheEntryInfo>>`
Parameters:
  `res` - Optional result.
  `err` - Optional error.
Returns:
  `True` if result was set by this call.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.2.0-incubating
Release Date | : June 16 2015