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

## Class GridDhtPartitionDemander.RebalanceFuture

- java.lang.Object
- - org.apache.ignite.internal.util.future.GridFutureAdapter<Boolean>
  - - org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionDemander.RebalanceFuture

All Implemented Interfaces:
  IgniteInternalFuture<Boolean>

Enclosing class:
  GridDhtPartitionDemander

    public static class GridDhtPartitionDemander.RebalanceFuture
    extends GridFutureAdapter<Boolean>

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `cancel()` Cancels this future.
`boolean` `compatibleWith(GridDhtPreloaderAssignments otherAssignments)`
`boolean` `isInitial()`
`boolean` `onDone(@Nullable Boolean res, @Nullable Throwable err)` Callback to notify that future is finished.
`boolean` `onDone(@Nullable Boolean res, @Nullable Throwable err, boolean cancel)`
`void` `requestPartitions()` Asynchronously sends initial demand messages formed from `assignments` and initiates supply-demand processes.
`AffinityTopologyVersion` `topologyVersion()`
`String` `toString()`

### 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, reset, result`

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

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

### Method Detail

#### requestPartitions

    public void requestPartitions()

Asynchronously sends initial demand messages formed from `assignments` and initiates supply-demand processes. For each node participating in rebalance process method distributes set of partitions for that node to several stripes (topics). It means that each stripe containing a subset of partitions can be processed in parallel. The number of stripes are controlled by `IgniteConfiguration.getRebalanceThreadPoolSize()` property. Partitions that can be rebalanced using only WAL are called historical, others are called full. Before sending messages, method awaits partitions clearing for full partitions.

#### onDone

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

#### topologyVersion

    public AffinityTopologyVersion topologyVersion()

Returns:
  Topology version.

#### isInitial

    public boolean isInitial()

Returns:
  Is initial (created at demander creation).

#### cancel

    public boolean cancel()

Cancels this future.

Specified by:
  `cancel` in interface `IgniteInternalFuture<Boolean>`
Overrides:
  `cancel` in class `GridFutureAdapter<Boolean>`
Returns:
  `True`.

#### onDone

    public boolean onDone(@Nullable
                          @Nullable Boolean res,
                          @Nullable
                          @Nullable Throwable err,
                          boolean cancel)

Overrides:
  `onDone` in class `GridFutureAdapter<Boolean>`
Parameters:
  `res` - Result.
  `err` - Error.
  `cancel` - `True` if future is being cancelled.
Returns:
  `True` if result was set by this call.

#### compatibleWith

    public boolean compatibleWith(GridDhtPreloaderAssignments otherAssignments)

Parameters:
  `otherAssignments` - Newest assigmnets.
Returns:
  `True` when future compared with other, `False` otherwise.

#### toString

    public String toString()

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

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.9.1
Release Date | : December 9 2020