@InterfaceAudience.Private public static final class BalanceResponse.Builder extends Object
BalanceResponse
for returning results of a balance
invocation to callersModifier and Type | Field and Description |
---|---|
private boolean |
balancerRan |
private int |
movesCalculated |
private int |
movesExecuted |
Modifier | Constructor and Description |
---|---|
private |
Builder() |
Modifier and Type | Method and Description |
---|---|
BalanceResponse |
build()
Build the
BalanceResponse |
BalanceResponse.Builder |
setBalancerRan(boolean balancerRan)
Set true if the balancer ran, otherwise false.
|
BalanceResponse.Builder |
setMovesCalculated(int movesCalculated)
Set how many moves were calculated by the balancer.
|
BalanceResponse.Builder |
setMovesExecuted(int movesExecuted)
Set how many of the calculated moves were actually executed by the balancer.
|
private boolean balancerRan
private int movesCalculated
private int movesExecuted
private Builder()
public BalanceResponse.Builder setBalancerRan(boolean balancerRan)
balancerRan
- true if balancer ran, false otherwisepublic BalanceResponse.Builder setMovesCalculated(int movesCalculated)
movesCalculated
- moves calculated by the balance runpublic BalanceResponse.Builder setMovesExecuted(int movesExecuted)
BalanceRequest.isDryRun()
. It may also not equal
movesCalculated if the balancer ran out of time while executing the moves.movesExecuted
- moves executed by the balance runpublic BalanceResponse build()
BalanceResponse
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.