@BetaApi public static enum FlowController.LimitExceededBehavior extends Enum<FlowController.LimitExceededBehavior>
| Enum Constant and Description |
|---|
Block
Waits until the request can be made without exceeding the limit.
|
Ignore
Disables flow-control.
|
ThrowException
|
| Modifier and Type | Method and Description |
|---|---|
static FlowController.LimitExceededBehavior |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static FlowController.LimitExceededBehavior[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FlowController.LimitExceededBehavior ThrowException
FlowController.MaxOutstandingElementCountReachedException or FlowController.MaxOutstandingRequestBytesReachedException.
This might be appropriate in interactive scenarios. For example, a web server might catch these exceptions and report to the user that the system is overloaded and that the user could try again later. It could also be useful in applications that implement custom rate-limiting logic.
public static final FlowController.LimitExceededBehavior Block
This might be appropriate in batch-processing, where latencies of individual requests are not important.
public static final FlowController.LimitExceededBehavior Ignore
This is provided mainly for debugging and not recommended for production use. Having too many requests in-flight might cause RPCs to fail due to congested network or the computer to run out of memory due to excessive buffering, etc.
public static FlowController.LimitExceededBehavior[] values()
for (FlowController.LimitExceededBehavior c : FlowController.LimitExceededBehavior.values()) System.out.println(c);
public static FlowController.LimitExceededBehavior valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is null