RebalanceOperation (Apache Geode 1.15.4)

org.apache.geode.management.operation

## Class RebalanceOperation

- java.lang.Object
- - org.apache.geode.management.operation.RebalanceOperation

- All Implemented Interfaces:
    Serializable, ClusterManagementOperation<RebalanceResult>, JsonSerializable

      @Experimental
      public class RebalanceOperation
      extends Object
      implements ClusterManagementOperation<RebalanceResult>

  Defines a distributed system request to optimize bucket allocation across members.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `REBALANCE_ENDPOINT` see `getEndpoint()`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RebalanceOperation()` by default, requests all partitioned regions to be rebalanced
    `RebalanceOperation(RebalanceOperation other)` Copy constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getEndpoint()` must match the REST controller's RequestMapping
    `List<String>` | `getExcludeRegions()` Returns the list of regions NOT to be rebalanced (iff `getIncludeRegions()` is empty)
    `List<String>` | `getIncludeRegions()` Returns the list of regions to be rebalanced (or an empty list for all-except-excluded)
    `String` | `getOperator()`
    `boolean` | `isSimulate()` Returns true if a "dry run" only is requested
    `void` | `setExcludeRegions(List<String> excludeRegions)` Excludes specific regions from the rebalance, if `getIncludeRegions()` is empty, otherwise has no effect default: no regions are excluded
    `void` | `setIncludeRegions(List<String> includeRegions)` Requests rebalance of the specified region(s) only.
    `void` | `setOperator(String operator)`
    `void` | `setSimulate(boolean simulate)` true requests a "dry run" (no actual buckets will be moved) default is false

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

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

- - ### Field Detail

    - #### REBALANCE_ENDPOINT

          public static final String REBALANCE_ENDPOINT

      see `getEndpoint()`
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### RebalanceOperation

          public RebalanceOperation()

      by default, requests all partitioned regions to be rebalanced

    - #### RebalanceOperation

          public RebalanceOperation(RebalanceOperation other)

      Copy constructor
      Parameters:
        `other` - The `RebalanceOperation` to copy

  - ### Method Detail

    - #### isSimulate

          public boolean isSimulate()

      Returns true if a "dry run" only is requested
      Returns:
        true if a "dry run" only is requested

    - #### setSimulate

          public void setSimulate(boolean simulate)

      true requests a "dry run" (no actual buckets will be moved) default is false
      Parameters:
        `simulate` - boolean specifying if the rebalance should be simulated

    - #### getIncludeRegions

          public List<String> getIncludeRegions()

      Returns the list of regions to be rebalanced (or an empty list for all-except-excluded)
      Returns:
        the list of regions to be rebalanced (or an empty list for all-except-excluded)

    - #### setIncludeRegions

          public void setIncludeRegions(List<String> includeRegions)

      Requests rebalance of the specified region(s) only. When at least one region is specified, this takes precedence over any excluded regions.
      Parameters:
        `includeRegions` - a list of region names to include in the rebalance operation

    - #### getExcludeRegions

          public List<String> getExcludeRegions()

      Returns the list of regions NOT to be rebalanced (iff `getIncludeRegions()` is empty)
      Returns:
        the list of regions NOT to be rebalanced (iff `getIncludeRegions()` is empty

    - #### setExcludeRegions

          public void setExcludeRegions(List<String> excludeRegions)

      Excludes specific regions from the rebalance, if `getIncludeRegions()` is empty, otherwise has no effect default: no regions are excluded
      Parameters:
        `excludeRegions` - a list of region names to exclude from the rebalance operation

    - #### getEndpoint

          public String getEndpoint()

      Description copied from interface: `ClusterManagementOperation`
      must match the REST controller's RequestMapping
      Specified by:
        `getEndpoint` in interface `ClusterManagementOperation<RebalanceResult>`
      Returns:
        the portion after /management/v1, e.g. /operations/name

    - #### getOperator

          public String getOperator()

      Specified by:
        `getOperator` in interface `ClusterManagementOperation<RebalanceResult>`

    - #### setOperator

          public void setOperator(String operator)