Package com.google.api.gax.batching
Enum FlowController.LimitExceededBehavior
java.lang.Object
java.lang.Enum<FlowController.LimitExceededBehavior>
com.google.api.gax.batching.FlowController.LimitExceededBehavior
- All Implemented Interfaces:
Serializable,Comparable<FlowController.LimitExceededBehavior>
- Enclosing class:
- FlowController
public static enum FlowController.LimitExceededBehavior
extends Enum<FlowController.LimitExceededBehavior>
Enumeration of behaviors that FlowController can use in case the flow control limits are
exceeded.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionWaits until the request can be made without exceeding the limit.Disables flow-control. -
Method Summary
Modifier and TypeMethodDescriptionReturns 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.
-
Enum Constant Details
-
ThrowException
ThrowsFlowController.MaxOutstandingElementCountReachedExceptionorFlowController.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.
-
Block
Waits until the request can be made without exceeding the limit.This might be appropriate in batch-processing, where latencies of individual requests are not important.
-
Ignore
Disables flow-control.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.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-