Class TaskQueueStats.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<TaskQueueStats.Builder>
com.google.protobuf.GeneratedMessageV3.Builder<TaskQueueStats.Builder>
io.temporal.api.taskqueue.v1.TaskQueueStats.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,TaskQueueStatsOrBuilder,Cloneable
- Enclosing class:
TaskQueueStats
public static final class TaskQueueStats.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<TaskQueueStats.Builder>
implements TaskQueueStatsOrBuilder
TaskQueueStats contains statistics about task queue backlog and activity. For workflow task queue type, this result is partial because tasks sent to sticky queues are not included. Read comments above each metric to understand the impact of sticky queue exclusion on that metric accuracy.Protobuf type
temporal.api.taskqueue.v1.TaskQueueStats-
Method Summary
Modifier and TypeMethodDescriptionaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()Approximate age of the oldest task in the backlog based on the creation time of the task at the head of the queue.The approximate number of tasks backlogged in this task queue.clearField(com.google.protobuf.Descriptors.FieldDescriptor field) clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) Whether rate limiting blocked any dispatches within the recent observation window (approximately 30 seconds).The approximate tasks per second added to the task queue, averaging the last 30 seconds.The approximate tasks per second dispatched from the task queue, averaging the last 30 seconds.clone()com.google.protobuf.DurationApproximate age of the oldest task in the backlog based on the creation time of the task at the head of the queue.com.google.protobuf.Duration.BuilderApproximate age of the oldest task in the backlog based on the creation time of the task at the head of the queue.com.google.protobuf.DurationOrBuilderApproximate age of the oldest task in the backlog based on the creation time of the task at the head of the queue.longThe approximate number of tasks backlogged in this task queue.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorbooleanWhether rate limiting blocked any dispatches within the recent observation window (approximately 30 seconds).floatThe approximate tasks per second added to the task queue, averaging the last 30 seconds.floatThe approximate tasks per second dispatched from the task queue, averaging the last 30 seconds.booleanApproximate age of the oldest task in the backlog based on the creation time of the task at the head of the queue.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeApproximateBacklogAge(com.google.protobuf.Duration value) Approximate age of the oldest task in the backlog based on the creation time of the task at the head of the queue.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(TaskQueueStats other) final TaskQueueStats.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) setApproximateBacklogAge(com.google.protobuf.Duration value) Approximate age of the oldest task in the backlog based on the creation time of the task at the head of the queue.setApproximateBacklogAge(com.google.protobuf.Duration.Builder builderForValue) Approximate age of the oldest task in the backlog based on the creation time of the task at the head of the queue.setApproximateBacklogCount(long value) The approximate number of tasks backlogged in this task queue.setRateLimitingActive(boolean value) Whether rate limiting blocked any dispatches within the recent observation window (approximately 30 seconds).setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setTasksAddRate(float value) The approximate tasks per second added to the task queue, averaging the last 30 seconds.setTasksDispatchRate(float value) The approximate tasks per second dispatched from the task queue, averaging the last 30 seconds.final TaskQueueStats.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<TaskQueueStats.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<TaskQueueStats.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<TaskQueueStats.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<TaskQueueStats.Builder>
-
setField
public TaskQueueStats.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<TaskQueueStats.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<TaskQueueStats.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<TaskQueueStats.Builder>
-
setRepeatedField
public TaskQueueStats.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<TaskQueueStats.Builder>
-
addRepeatedField
public TaskQueueStats.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<TaskQueueStats.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<TaskQueueStats.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<TaskQueueStats.Builder>
-
mergeFrom
public TaskQueueStats.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<TaskQueueStats.Builder>- Throws:
IOException
-
getApproximateBacklogCount
public long getApproximateBacklogCount()The approximate number of tasks backlogged in this task queue. May count expired tasks but eventually converges to the right value. Can be relied upon for scaling decisions. Special note for workflow task queue type: this metric does not count sticky queue tasks. However, because those tasks only remain valid for a few seconds, the inaccuracy becomes less significant as the backlog size grows.
int64 approximate_backlog_count = 1;- Specified by:
getApproximateBacklogCountin interfaceTaskQueueStatsOrBuilder- Returns:
- The approximateBacklogCount.
-
setApproximateBacklogCount
The approximate number of tasks backlogged in this task queue. May count expired tasks but eventually converges to the right value. Can be relied upon for scaling decisions. Special note for workflow task queue type: this metric does not count sticky queue tasks. However, because those tasks only remain valid for a few seconds, the inaccuracy becomes less significant as the backlog size grows.
int64 approximate_backlog_count = 1;- Parameters:
value- The approximateBacklogCount to set.- Returns:
- This builder for chaining.
-
clearApproximateBacklogCount
The approximate number of tasks backlogged in this task queue. May count expired tasks but eventually converges to the right value. Can be relied upon for scaling decisions. Special note for workflow task queue type: this metric does not count sticky queue tasks. However, because those tasks only remain valid for a few seconds, the inaccuracy becomes less significant as the backlog size grows.
int64 approximate_backlog_count = 1;- Returns:
- This builder for chaining.
-
hasApproximateBacklogAge
public boolean hasApproximateBacklogAge()Approximate age of the oldest task in the backlog based on the creation time of the task at the head of the queue. Can be relied upon for scaling decisions. Special note for workflow task queue type: this metric does not count sticky queue tasks. However, because those tasks only remain valid for a few seconds, they should not affect the result when backlog is older than few seconds.
.google.protobuf.Duration approximate_backlog_age = 2;- Specified by:
hasApproximateBacklogAgein interfaceTaskQueueStatsOrBuilder- Returns:
- Whether the approximateBacklogAge field is set.
-
getApproximateBacklogAge
public com.google.protobuf.Duration getApproximateBacklogAge()Approximate age of the oldest task in the backlog based on the creation time of the task at the head of the queue. Can be relied upon for scaling decisions. Special note for workflow task queue type: this metric does not count sticky queue tasks. However, because those tasks only remain valid for a few seconds, they should not affect the result when backlog is older than few seconds.
.google.protobuf.Duration approximate_backlog_age = 2;- Specified by:
getApproximateBacklogAgein interfaceTaskQueueStatsOrBuilder- Returns:
- The approximateBacklogAge.
-
setApproximateBacklogAge
Approximate age of the oldest task in the backlog based on the creation time of the task at the head of the queue. Can be relied upon for scaling decisions. Special note for workflow task queue type: this metric does not count sticky queue tasks. However, because those tasks only remain valid for a few seconds, they should not affect the result when backlog is older than few seconds.
.google.protobuf.Duration approximate_backlog_age = 2; -
setApproximateBacklogAge
public TaskQueueStats.Builder setApproximateBacklogAge(com.google.protobuf.Duration.Builder builderForValue) Approximate age of the oldest task in the backlog based on the creation time of the task at the head of the queue. Can be relied upon for scaling decisions. Special note for workflow task queue type: this metric does not count sticky queue tasks. However, because those tasks only remain valid for a few seconds, they should not affect the result when backlog is older than few seconds.
.google.protobuf.Duration approximate_backlog_age = 2; -
mergeApproximateBacklogAge
Approximate age of the oldest task in the backlog based on the creation time of the task at the head of the queue. Can be relied upon for scaling decisions. Special note for workflow task queue type: this metric does not count sticky queue tasks. However, because those tasks only remain valid for a few seconds, they should not affect the result when backlog is older than few seconds.
.google.protobuf.Duration approximate_backlog_age = 2; -
clearApproximateBacklogAge
Approximate age of the oldest task in the backlog based on the creation time of the task at the head of the queue. Can be relied upon for scaling decisions. Special note for workflow task queue type: this metric does not count sticky queue tasks. However, because those tasks only remain valid for a few seconds, they should not affect the result when backlog is older than few seconds.
.google.protobuf.Duration approximate_backlog_age = 2; -
getApproximateBacklogAgeBuilder
public com.google.protobuf.Duration.Builder getApproximateBacklogAgeBuilder()Approximate age of the oldest task in the backlog based on the creation time of the task at the head of the queue. Can be relied upon for scaling decisions. Special note for workflow task queue type: this metric does not count sticky queue tasks. However, because those tasks only remain valid for a few seconds, they should not affect the result when backlog is older than few seconds.
.google.protobuf.Duration approximate_backlog_age = 2; -
getApproximateBacklogAgeOrBuilder
public com.google.protobuf.DurationOrBuilder getApproximateBacklogAgeOrBuilder()Approximate age of the oldest task in the backlog based on the creation time of the task at the head of the queue. Can be relied upon for scaling decisions. Special note for workflow task queue type: this metric does not count sticky queue tasks. However, because those tasks only remain valid for a few seconds, they should not affect the result when backlog is older than few seconds.
.google.protobuf.Duration approximate_backlog_age = 2;- Specified by:
getApproximateBacklogAgeOrBuilderin interfaceTaskQueueStatsOrBuilder
-
getTasksAddRate
public float getTasksAddRate()The approximate tasks per second added to the task queue, averaging the last 30 seconds. These includes tasks whether or not they were added to/dispatched from the backlog or they were dispatched immediately without going to the backlog (sync-matched). The difference between `tasks_add_rate` and `tasks_dispatch_rate` is a reliable metric for the rate at which backlog grows/shrinks. Note: the actual tasks delivered to the workers may significantly be higher than the numbers reported by tasks_add_rate, because: - Tasks can be sent to workers without going to the task queue. This is called Eager dispatch. Eager dispatch is enable for activities by default in the latest SDKs. - Tasks going to Sticky queue are not accounted for. Note that, typically, only the first workflow task of each workflow goes to a normal queue, and the rest workflow tasks go to the Sticky queue associated with a specific worker instance.
float tasks_add_rate = 3;- Specified by:
getTasksAddRatein interfaceTaskQueueStatsOrBuilder- Returns:
- The tasksAddRate.
-
setTasksAddRate
The approximate tasks per second added to the task queue, averaging the last 30 seconds. These includes tasks whether or not they were added to/dispatched from the backlog or they were dispatched immediately without going to the backlog (sync-matched). The difference between `tasks_add_rate` and `tasks_dispatch_rate` is a reliable metric for the rate at which backlog grows/shrinks. Note: the actual tasks delivered to the workers may significantly be higher than the numbers reported by tasks_add_rate, because: - Tasks can be sent to workers without going to the task queue. This is called Eager dispatch. Eager dispatch is enable for activities by default in the latest SDKs. - Tasks going to Sticky queue are not accounted for. Note that, typically, only the first workflow task of each workflow goes to a normal queue, and the rest workflow tasks go to the Sticky queue associated with a specific worker instance.
float tasks_add_rate = 3;- Parameters:
value- The tasksAddRate to set.- Returns:
- This builder for chaining.
-
clearTasksAddRate
The approximate tasks per second added to the task queue, averaging the last 30 seconds. These includes tasks whether or not they were added to/dispatched from the backlog or they were dispatched immediately without going to the backlog (sync-matched). The difference between `tasks_add_rate` and `tasks_dispatch_rate` is a reliable metric for the rate at which backlog grows/shrinks. Note: the actual tasks delivered to the workers may significantly be higher than the numbers reported by tasks_add_rate, because: - Tasks can be sent to workers without going to the task queue. This is called Eager dispatch. Eager dispatch is enable for activities by default in the latest SDKs. - Tasks going to Sticky queue are not accounted for. Note that, typically, only the first workflow task of each workflow goes to a normal queue, and the rest workflow tasks go to the Sticky queue associated with a specific worker instance.
float tasks_add_rate = 3;- Returns:
- This builder for chaining.
-
getTasksDispatchRate
public float getTasksDispatchRate()The approximate tasks per second dispatched from the task queue, averaging the last 30 seconds. These includes tasks whether or not they were added to/dispatched from the backlog or they were dispatched immediately without going to the backlog (sync-matched). The difference between `tasks_add_rate` and `tasks_dispatch_rate` is a reliable metric for the rate at which backlog grows/shrinks. Note: the actual tasks delivered to the workers may significantly be higher than the numbers reported by tasks_dispatch_rate, because: - Tasks can be sent to workers without going to the task queue. This is called Eager dispatch. Eager dispatch is enable for activities by default in the latest SDKs. - Tasks going to Sticky queue are not accounted for. Note that, typically, only the first workflow task of each workflow goes to a normal queue, and the rest workflow tasks go to the Sticky queue associated with a specific worker instance.
float tasks_dispatch_rate = 4;- Specified by:
getTasksDispatchRatein interfaceTaskQueueStatsOrBuilder- Returns:
- The tasksDispatchRate.
-
setTasksDispatchRate
The approximate tasks per second dispatched from the task queue, averaging the last 30 seconds. These includes tasks whether or not they were added to/dispatched from the backlog or they were dispatched immediately without going to the backlog (sync-matched). The difference between `tasks_add_rate` and `tasks_dispatch_rate` is a reliable metric for the rate at which backlog grows/shrinks. Note: the actual tasks delivered to the workers may significantly be higher than the numbers reported by tasks_dispatch_rate, because: - Tasks can be sent to workers without going to the task queue. This is called Eager dispatch. Eager dispatch is enable for activities by default in the latest SDKs. - Tasks going to Sticky queue are not accounted for. Note that, typically, only the first workflow task of each workflow goes to a normal queue, and the rest workflow tasks go to the Sticky queue associated with a specific worker instance.
float tasks_dispatch_rate = 4;- Parameters:
value- The tasksDispatchRate to set.- Returns:
- This builder for chaining.
-
clearTasksDispatchRate
The approximate tasks per second dispatched from the task queue, averaging the last 30 seconds. These includes tasks whether or not they were added to/dispatched from the backlog or they were dispatched immediately without going to the backlog (sync-matched). The difference between `tasks_add_rate` and `tasks_dispatch_rate` is a reliable metric for the rate at which backlog grows/shrinks. Note: the actual tasks delivered to the workers may significantly be higher than the numbers reported by tasks_dispatch_rate, because: - Tasks can be sent to workers without going to the task queue. This is called Eager dispatch. Eager dispatch is enable for activities by default in the latest SDKs. - Tasks going to Sticky queue are not accounted for. Note that, typically, only the first workflow task of each workflow goes to a normal queue, and the rest workflow tasks go to the Sticky queue associated with a specific worker instance.
float tasks_dispatch_rate = 4;- Returns:
- This builder for chaining.
-
getRateLimitingActive
public boolean getRateLimitingActive()Whether rate limiting blocked any dispatches within the recent observation window (approximately 30 seconds). When true, adding more workers will not increase throughput — the bottleneck is the rate limit, not worker count. This field is useful for auto-scaling systems to avoid unnecessary scale-up.
bool rate_limiting_active = 5;- Specified by:
getRateLimitingActivein interfaceTaskQueueStatsOrBuilder- Returns:
- The rateLimitingActive.
-
setRateLimitingActive
Whether rate limiting blocked any dispatches within the recent observation window (approximately 30 seconds). When true, adding more workers will not increase throughput — the bottleneck is the rate limit, not worker count. This field is useful for auto-scaling systems to avoid unnecessary scale-up.
bool rate_limiting_active = 5;- Parameters:
value- The rateLimitingActive to set.- Returns:
- This builder for chaining.
-
clearRateLimitingActive
Whether rate limiting blocked any dispatches within the recent observation window (approximately 30 seconds). When true, adding more workers will not increase throughput — the bottleneck is the rate limit, not worker count. This field is useful for auto-scaling systems to avoid unnecessary scale-up.
bool rate_limiting_active = 5;- Returns:
- This builder for chaining.
-
setUnknownFields
public final TaskQueueStats.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<TaskQueueStats.Builder>
-
mergeUnknownFields
public final TaskQueueStats.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<TaskQueueStats.Builder>
-