@InterfaceAudience.Public public final class BalanceResponse extends Object
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
BalanceResponse.Builder
Used in HMaster to build a  
BalanceResponse for returning results of a balance
 invocation to callers | 
| Modifier and Type | Field and Description | 
|---|---|
private boolean | 
balancerRan  | 
private int | 
movesCalculated  | 
private int | 
movesExecuted  | 
| Modifier | Constructor and Description | 
|---|---|
private  | 
BalanceResponse(boolean balancerRan,
               int movesCalculated,
               int movesExecuted)  | 
| Modifier and Type | Method and Description | 
|---|---|
int | 
getMovesCalculated()
The number of moves calculated by the balancer if  
isBalancerRan() is true. | 
int | 
getMovesExecuted()
The number of moves actually executed by the balancer if it ran. 
 | 
boolean | 
isBalancerRan()
Returns true if the balancer ran, otherwise false. 
 | 
static BalanceResponse.Builder | 
newBuilder()
Creates a new  
BalanceResponse.Builder | 
private final boolean balancerRan
private final int movesCalculated
private final int movesExecuted
private BalanceResponse(boolean balancerRan, int movesCalculated, int movesExecuted)
public static BalanceResponse.Builder newBuilder()
BalanceResponse.Builderpublic boolean isBalancerRan()
public int getMovesCalculated()
isBalancerRan() is true. This will
 be zero if no better balance could be found.public int getMovesExecuted()
getMovesCalculated() is zero or if BalanceRequest.isDryRun() was true. It may
 also not be equal to getMovesCalculated() if the balancer was interrupted midway
 through executing the moves due to max run time.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.