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:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionby default, requests all partitioned regions to be rebalancedCopy constructor -
Method Summary
Modifier and TypeMethodDescriptionmust match the REST controller's RequestMappingReturns the list of regions NOT to be rebalanced (iffgetIncludeRegions()is empty)Returns the list of regions to be rebalanced (or an empty list for all-except-excluded)booleanReturns true if a "dry run" only is requestedvoidsetExcludeRegions(List<String> excludeRegions) Excludes specific regions from the rebalance, ifgetIncludeRegions()is empty, otherwise has no effect default: no regions are excludedvoidsetIncludeRegions(List<String> includeRegions) Requests rebalance of the specified region(s) only.voidsetOperator(String operator) voidsetSimulate(boolean simulate) true requests a "dry run" (no actual buckets will be moved) default is false
-
Field Details
-
REBALANCE_ENDPOINT
seegetEndpoint()- See Also:
-
-
Constructor Details
-
RebalanceOperation
public RebalanceOperation()by default, requests all partitioned regions to be rebalanced -
RebalanceOperation
Copy constructor- Parameters:
other- TheRebalanceOperationto copy
-
-
Method Details
-
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
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
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
Returns the list of regions NOT to be rebalanced (iffgetIncludeRegions()is empty)- Returns:
- the list of regions NOT to be rebalanced (iff
getIncludeRegions()is empty
-
setExcludeRegions
Excludes specific regions from the rebalance, ifgetIncludeRegions()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
Description copied from interface:ClusterManagementOperationmust match the REST controller's RequestMapping- Specified by:
getEndpointin interfaceClusterManagementOperation<RebalanceResult>- Returns:
- the portion after /management/v1, e.g. /operations/name
-
getOperator
- Specified by:
getOperatorin interfaceClusterManagementOperation<RebalanceResult>
-
setOperator
-