Package com.google.api.gax.batching
Class FlowControlSettings
- java.lang.Object
-
- com.google.api.gax.batching.FlowControlSettings
-
public abstract class FlowControlSettings extends java.lang.ObjectSettings forFlowController.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFlowControlSettings.Builder
-
Constructor Summary
Constructors Constructor Description FlowControlSettings()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static FlowControlSettingsgetDefaultInstance()abstract FlowController.LimitExceededBehaviorgetLimitExceededBehavior()The behavior ofFlowControllerwhen the specified limits are exceeded.abstract java.lang.LonggetMaxOutstandingElementCount()Maximum number of outstanding elements to keep in memory before enforcing flow control.abstract java.lang.LonggetMaxOutstandingRequestBytes()Maximum number of outstanding bytes to keep in memory before enforcing flow control.static FlowControlSettings.BuildernewBuilder()abstract FlowControlSettings.BuildertoBuilder()
-
-
-
Method Detail
-
getDefaultInstance
public static FlowControlSettings getDefaultInstance()
-
getMaxOutstandingElementCount
@Nullable public abstract java.lang.Long getMaxOutstandingElementCount()
Maximum number of outstanding elements to keep in memory before enforcing flow control.
-
getMaxOutstandingRequestBytes
@Nullable public abstract java.lang.Long getMaxOutstandingRequestBytes()
Maximum number of outstanding bytes to keep in memory before enforcing flow control.
-
getLimitExceededBehavior
public abstract FlowController.LimitExceededBehavior getLimitExceededBehavior()
The behavior ofFlowControllerwhen the specified limits are exceeded. Defaults to Block.The expected behavior for each of these values is:
- ThrowException: the FlowController will throw a
FlowController.FlowControlExceptionif any of the limits are exceeded. - Block: the reserve() method of FlowController will block until the quote is available to be reserved.
- Ignore: all flow control limits will be ignored; the FlowController is disabled.
- ThrowException: the FlowController will throw a
-
toBuilder
public abstract FlowControlSettings.Builder toBuilder()
-
newBuilder
public static FlowControlSettings.Builder newBuilder()
-
-