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

## Class GridDhtForceKeysFuture<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<Object,Collection<K>>
        - - org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtForceKeysFuture<K,V>

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

    public final class GridDhtForceKeysFuture<K,V>
    extends GridCompoundFuture<Object,Collection<K>>
    implements GridDhtFuture<Collection<K>>

Force keys request future.

See Also:
  Serialized Form

### Nested Class Summary

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

`AbstractQueuedSynchronizer.ConditionObject`

### Field Summary

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

`futs`

### Constructor Summary

Constructors
Constructor and Description
`GridDhtForceKeysFuture(GridCacheContext<K,V> cctx, AffinityTopologyVersion topVer, Collection<KeyCacheObject> keys, GridDhtPreloader preloader)`

### Method Summary

Methods
`IgniteUuid` `futureId()`
`void` `init()` Initializes this future.
`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.
`void` `onDiscoveryEvent(DiscoveryEvent evt)`
`boolean` `onDone(Collection<K> res, Throwable err)` Callback to notify that future is finished.
`void` `onResult(UUID nodeId, GridDhtForceKeysResponse res)`
`String` `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, 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

#### GridDhtForceKeysFuture

    public GridDhtForceKeysFuture(GridCacheContext<K,V> cctx,
                          AffinityTopologyVersion topVer,
                          Collection<KeyCacheObject> keys,
                          GridDhtPreloader preloader)

Parameters:
  `cctx` - Cache context.
  `topVer` - Topology version.
  `keys` - Keys.
  `preloader` - Preloader.

### Method Detail

#### futureId

    public IgniteUuid futureId()

Returns:
  Future ID.

#### 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<K>>`
Returns:
  Keys to retry because this node is no longer a primary or backup.

#### onDone

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

#### onDiscoveryEvent

    public void onDiscoveryEvent(DiscoveryEvent evt)

Parameters:
  `evt` - Discovery event.

#### onResult

    public void onResult(UUID nodeId,
                GridDhtForceKeysResponse res)

Parameters:
  `nodeId` - Node left callback.
  `res` - Response.

#### init

    public void init()

Initializes this future.

#### toString

    public String toString()

Overrides:
  `toString` in class `GridCompoundFuture<Object,Collection<K>>`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.5.0.final
Release Date | : December 29 2015