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

## Class GridDhtAssignmentFetchFuture

- java.lang.Object
- - org.apache.ignite.internal.util.future.GridFutureAdapter<GridDhtAffinityAssignmentResponse>
  - - org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtAssignmentFetchFuture

All Implemented Interfaces:
  IgniteInternalFuture<GridDhtAffinityAssignmentResponse>

    public class GridDhtAssignmentFetchFuture
    extends GridFutureAdapter<GridDhtAffinityAssignmentResponse>

Future that fetches affinity assignment from remote cache nodes.

### Constructor Summary

Constructors
Constructor and Description
`GridDhtAssignmentFetchFuture(GridCacheSharedContext ctx, String cacheName, AffinityTopologyVersion topVer, DiscoCache discoCache)`

### Method Summary

Methods
`void` `init()` Initializes fetch future.
`T2<Integer,AffinityTopologyVersion>` `key()`
`boolean` `onDone(GridDhtAffinityAssignmentResponse res, Throwable err)` Callback to notify that future is finished.
`void` `onNodeLeft(UUID leftNodeId)`
`void` `onResponse(UUID nodeId, GridDhtAffinityAssignmentResponse res)`
`String` `toString()`

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

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

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

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

### Constructor Detail

#### GridDhtAssignmentFetchFuture

    public GridDhtAssignmentFetchFuture(GridCacheSharedContext ctx,
                                String cacheName,
                                AffinityTopologyVersion topVer,
                                DiscoCache discoCache)

Parameters:
  `ctx` - Context.
  `cacheName` - Cache name.
  `topVer` - Topology version.
  `discoCache` - Discovery cache.

### Method Detail

#### init

    public void init()

Initializes fetch future.

#### key

    public T2<Integer,AffinityTopologyVersion> key()

Returns:
  Future key.

#### onResponse

    public void onResponse(UUID nodeId,
                  GridDhtAffinityAssignmentResponse res)

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

#### onNodeLeft

    public void onNodeLeft(UUID leftNodeId)

Parameters:
  `leftNodeId` - Left node ID.

#### onDone

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

#### toString

    public String toString()

Overrides:
  `toString` in class `GridFutureAdapter<GridDhtAffinityAssignmentResponse>`

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.0.0
Release Date | : April 30 2017