@Experimental public class RebalanceOperation extends Object implements ClusterManagementOperation<RebalanceResult>
Modifier and Type | Field and Description |
---|---|
static String |
REBALANCE_ENDPOINT
see
getEndpoint() |
Constructor and Description |
---|
RebalanceOperation()
by default, requests all partitioned regions to be rebalanced
|
RebalanceOperation(RebalanceOperation other)
Copy constructor
|
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
|
public static final String REBALANCE_ENDPOINT
getEndpoint()
public RebalanceOperation()
public RebalanceOperation(RebalanceOperation other)
other
- The RebalanceOperation
to copypublic boolean isSimulate()
public void setSimulate(boolean simulate)
simulate
- boolean specifying if the rebalance should be simulatedpublic List<String> getIncludeRegions()
public void setIncludeRegions(List<String> includeRegions)
includeRegions
- a list of region names to include in the rebalance operationpublic List<String> getExcludeRegions()
getIncludeRegions()
is empty)getIncludeRegions()
is emptypublic void setExcludeRegions(List<String> excludeRegions)
getIncludeRegions()
is empty,
otherwise has no effect
default: no regions are excludedexcludeRegions
- a list of region names to exclude from the rebalance operationpublic String getEndpoint()
ClusterManagementOperation
getEndpoint
in interface ClusterManagementOperation<RebalanceResult>
public String getOperator()
getOperator
in interface ClusterManagementOperation<RebalanceResult>
public void setOperator(String operator)