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, int grpId, AffinityTopologyVersion topVer, DiscoCache discoCache)`

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `groupId()`
`long` `id()`
`void` `init(boolean needPartState)` Initializes fetch future.
`boolean` `onDone(@Nullable GridDhtAffinityAssignmentResponse res, @Nullable 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, chain, chain, chainCompose, chainCompose, error, get, get, get, getUninterruptibly, ignoreInterrupts, isCancelled, isDone, isFailed, listen, 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`

### Constructor Detail

#### GridDhtAssignmentFetchFuture

    public GridDhtAssignmentFetchFuture(GridCacheSharedContext ctx,
                                        int grpId,
                                        AffinityTopologyVersion topVer,
                                        DiscoCache discoCache)

Parameters:
  `ctx` - Context.
  `grpId` - Group ID.
  `topVer` - Topology version.
  `discoCache` - Discovery cache.

### Method Detail

#### groupId

    public int groupId()

Returns:
  Cache group ID.

#### id

    public long id()

Returns:
  Future ID.

#### init

    public void init(boolean needPartState)

Initializes fetch future.

Parameters:
  `needPartState` - `True` if also need fetch partitions state.

#### 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
                          @Nullable GridDhtAffinityAssignmentResponse 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<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>`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.16.0
Release Date | : December 15 2023