public static final class RateLimits.Builder extends GeneratedMessageV3.Builder<RateLimits.Builder> implements RateLimitsOrBuilder
Rate limits. This message determines the maximum rate that tasks can be dised by a queue, regardless of whether the dis is a first task attempt or a retry. Note: The debugging command, RunTask, will run a task even if the queue has reached its RateLimits.
Protobuf type google.cloud.tasks.v2.RateLimits
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
ReturnsMethods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public RateLimits.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
ParametersReturnsOverridesbuild()
public RateLimits build()
ReturnsbuildPartial()
public RateLimits buildPartial()
Returnsclear()
public RateLimits.Builder clear()
ReturnsOverridesclearField(Descriptors.FieldDescriptor field)
public RateLimits.Builder clearField(Descriptors.FieldDescriptor field)
ParameterReturnsOverridesclearMaxBurstSize()
public RateLimits.Builder clearMaxBurstSize()
Output only. The max burst size. Max burst size limits how fast tasks in queue are processed when many tasks are in the queue and the rate is high. This field allows the queue to have a high rate so processing starts shortly after a task is enqueued, but still limits resource usage when many tasks are enqueued in a short period of time. The token bucket algorithm is used to control the rate of task dises. Each queue has a token bucket that holds tokens, up to the maximum specified by max_burst_size
. Each time a task is dised, a token is removed from the bucket. Tasks will be dised until the queue's bucket runs out of tokens. The bucket will be continuously refilled with new tokens based on max_dises_per_second. Cloud Tasks will pick the value of max_burst_size
based on the value of max_dises_per_second. For queues that were created or updated using queue.yaml/xml
, max_burst_size
is equal to bucket_size. Since max_burst_size
is output only, if UpdateQueue is called on a queue created by queue.yaml/xml
, max_burst_size
will be reset based on the value of max_dises_per_second, regardless of whether max_dises_per_second is updated.
int32 max_burst_size = 2;
ReturnsclearMaxConcurrentDises()
public RateLimits.Builder clearMaxConcurrentDises()
The maximum number of concurrent tasks that Cloud Tasks allows to be dised for this queue. After this threshold has been reached, Cloud Tasks stops dising tasks until the number of concurrent requests decreases. If unspecified when the queue is created, Cloud Tasks will pick the default. The maximum allowed value is 5,000. This field has the same meaning as max_concurrent_requests in queue.yaml/xml.
int32 max_concurrent_dises = 3;
ReturnsclearMaxDisesPerSecond()
public RateLimits.Builder clearMaxDisesPerSecond()
The maximum rate at which tasks are dised from this queue. If unspecified when the queue is created, Cloud Tasks will pick the default.
double max_dises_per_second = 1;
ReturnsclearOneof(Descriptors.OneofDescriptor oneof)
public RateLimits.Builder clearOneof(Descriptors.OneofDescriptor oneof)
ParameterReturnsOverridesclone()
public RateLimits.Builder clone()
ReturnsOverridesgetDefaultInstanceForType()
public RateLimits getDefaultInstanceForType()
ReturnsgetDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
ReturnsOverridesgetMaxBurstSize()
public int getMaxBurstSize()
Output only. The max burst size. Max burst size limits how fast tasks in queue are processed when many tasks are in the queue and the rate is high. This field allows the queue to have a high rate so processing starts shortly after a task is enqueued, but still limits resource usage when many tasks are enqueued in a short period of time. The token bucket algorithm is used to control the rate of task dises. Each queue has a token bucket that holds tokens, up to the maximum specified by max_burst_size
. Each time a task is dised, a token is removed from the bucket. Tasks will be dised until the queue's bucket runs out of tokens. The bucket will be continuously refilled with new tokens based on max_dises_per_second. Cloud Tasks will pick the value of max_burst_size
based on the value of max_dises_per_second. For queues that were created or updated using queue.yaml/xml
, max_burst_size
is equal to bucket_size. Since max_burst_size
is output only, if UpdateQueue is called on a queue created by queue.yaml/xml
, max_burst_size
will be reset based on the value of max_dises_per_second, regardless of whether max_dises_per_second is updated.
int32 max_burst_size = 2;
ReturnsType | Description |
int | The maxBurstSize. |
getMaxConcurrentDises()
public int getMaxConcurrentDises()
The maximum number of concurrent tasks that Cloud Tasks allows to be dised for this queue. After this threshold has been reached, Cloud Tasks stops dising tasks until the number of concurrent requests decreases. If unspecified when the queue is created, Cloud Tasks will pick the default. The maximum allowed value is 5,000. This field has the same meaning as max_concurrent_requests in queue.yaml/xml.
int32 max_concurrent_dises = 3;
ReturnsType | Description |
int | The maxConcurrentDises. |
getMaxDisesPerSecond()
public double getMaxDisesPerSecond()
The maximum rate at which tasks are dised from this queue. If unspecified when the queue is created, Cloud Tasks will pick the default.
double max_dises_per_second = 1;
ReturnsType | Description |
double | The maxDisesPerSecond. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
ReturnsOverridesisInitialized()
public final boolean isInitialized()
ReturnsOverridesmergeFrom(RateLimits other)
public RateLimits.Builder mergeFrom(RateLimits other)
ParameterReturnspublic RateLimits.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
ParametersReturnsOverridesExceptionsmergeFrom(Message other)
public RateLimits.Builder mergeFrom(Message other)
ParameterReturnsOverridesmergeUnknownFields(UnknownFieldSet unknownFields)
public final RateLimits.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
ParameterReturnsOverridessetField(Descriptors.FieldDescriptor field, Object value)
public RateLimits.Builder setField(Descriptors.FieldDescriptor field, Object value)
ParametersReturnsOverridessetMaxBurstSize(int value)
public RateLimits.Builder setMaxBurstSize(int value)
Output only. The max burst size. Max burst size limits how fast tasks in queue are processed when many tasks are in the queue and the rate is high. This field allows the queue to have a high rate so processing starts shortly after a task is enqueued, but still limits resource usage when many tasks are enqueued in a short period of time. The token bucket algorithm is used to control the rate of task dises. Each queue has a token bucket that holds tokens, up to the maximum specified by max_burst_size
. Each time a task is dised, a token is removed from the bucket. Tasks will be dised until the queue's bucket runs out of tokens. The bucket will be continuously refilled with new tokens based on max_dises_per_second. Cloud Tasks will pick the value of max_burst_size
based on the value of max_dises_per_second. For queues that were created or updated using queue.yaml/xml
, max_burst_size
is equal to bucket_size. Since max_burst_size
is output only, if UpdateQueue is called on a queue created by queue.yaml/xml
, max_burst_size
will be reset based on the value of max_dises_per_second, regardless of whether max_dises_per_second is updated.
int32 max_burst_size = 2;
ParameterName | Description |
value | int
The maxBurstSize to set. |
ReturnssetMaxConcurrentDises(int value)
public RateLimits.Builder setMaxConcurrentDises(int value)
The maximum number of concurrent tasks that Cloud Tasks allows to be dised for this queue. After this threshold has been reached, Cloud Tasks stops dising tasks until the number of concurrent requests decreases. If unspecified when the queue is created, Cloud Tasks will pick the default. The maximum allowed value is 5,000. This field has the same meaning as max_concurrent_requests in queue.yaml/xml.
int32 max_concurrent_dises = 3;
ParameterName | Description |
value | int
The maxConcurrentDises to set. |
ReturnssetMaxDisesPerSecond(double value)
public RateLimits.Builder setMaxDisesPerSecond(double value)
The maximum rate at which tasks are dised from this queue. If unspecified when the queue is created, Cloud Tasks will pick the default.
double max_dises_per_second = 1;
ParameterName | Description |
value | double
The maxDisesPerSecond to set. |
ReturnssetRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public RateLimits.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
ParametersReturnsOverridessetUnknownFields(UnknownFieldSet unknownFields)
public final RateLimits.Builder setUnknownFields(UnknownFieldSet unknownFields)
ParameterReturnsOverrides