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

## Class GridDhtForceKeysFuture<K,V>

- java.lang.Object
- - 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>>, IgniteInClosure<IgniteInternalFuture<Object>>

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

Force keys request future.

See Also:
  Serialized Form

### Constructor Summary

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

### Method Summary

All Methods Instance Methods Concrete 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(@Nullable Collection<K> res, @Nullable Throwable err)` Callback to notify that future is finished.
`void` `onResult(GridDhtForceKeysResponse res)`
`String` `toString()`

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

`add, apply, cancel, clear, future, futures, futuresCountNoLock, hasFutures, hasPending, ignoreFailure, initialized, logDebug, logError, markInitialized, processFailure`

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

`chain, chain, error, get, get, get, getUninterruptibly, ignoreInterrupts, isCancelled, isDone, isFailed, listen, logger, onCancelled, onDone, onDone, onDone, onDone, reset, result`

### 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, chain, error, get, get, get, getUninterruptibly, isCancelled, isDone, listen, result`

### Constructor Detail

#### GridDhtForceKeysFuture

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

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

### 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
                          @Nullable Collection<K> res,
                          @Nullable
                          @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(GridDhtForceKeysResponse res)

Parameters:
  `res` - Response.

#### init

    public void init()

Initializes this future.

#### toString

    public String toString()

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

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.10.0
Release Date | : March 10 2021