Package io.temporal.api.taskqueue.v1
Class TaskQueueStats.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderType>
-
- 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,java.lang.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 typetemporal.api.taskqueue.v1.TaskQueueStats
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TaskQueueStats.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)TaskQueueStatsbuild()TaskQueueStatsbuildPartial()TaskQueueStats.Builderclear()TaskQueueStats.BuilderclearApproximateBacklogAge()Approximate age of the oldest task in the backlog based on the creation time of the task at the head of the queue.TaskQueueStats.BuilderclearApproximateBacklogCount()The approximate number of tasks backlogged in this task queue.TaskQueueStats.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)TaskQueueStats.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)TaskQueueStats.BuilderclearTasksAddRate()The approximate tasks per second added to the task queue, averaging the last 30 seconds.TaskQueueStats.BuilderclearTasksDispatchRate()The approximate tasks per second dispatched from the task queue, averaging the last 30 seconds.TaskQueueStats.Builderclone()com.google.protobuf.DurationgetApproximateBacklogAge()Approximate 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.BuildergetApproximateBacklogAgeBuilder()Approximate 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.DurationOrBuildergetApproximateBacklogAgeOrBuilder()Approximate age of the oldest task in the backlog based on the creation time of the task at the head of the queue.longgetApproximateBacklogCount()The approximate number of tasks backlogged in this task queue.TaskQueueStatsgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()floatgetTasksAddRate()The approximate tasks per second added to the task queue, averaging the last 30 seconds.floatgetTasksDispatchRate()The approximate tasks per second dispatched from the task queue, averaging the last 30 seconds.booleanhasApproximateBacklogAge()Approximate 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.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()TaskQueueStats.BuildermergeApproximateBacklogAge(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.TaskQueueStats.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)TaskQueueStats.BuildermergeFrom(com.google.protobuf.Message other)TaskQueueStats.BuildermergeFrom(TaskQueueStats other)TaskQueueStats.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)TaskQueueStats.BuildersetApproximateBacklogAge(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.TaskQueueStats.BuildersetApproximateBacklogAge(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.TaskQueueStats.BuildersetApproximateBacklogCount(long value)The approximate number of tasks backlogged in this task queue.TaskQueueStats.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)TaskQueueStats.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)TaskQueueStats.BuildersetTasksAddRate(float value)The approximate tasks per second added to the task queue, averaging the last 30 seconds.TaskQueueStats.BuildersetTasksDispatchRate(float value)The approximate tasks per second dispatched from the task queue, averaging the last 30 seconds.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, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
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
public 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
public TaskQueueStats getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public TaskQueueStats build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public TaskQueueStats buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public TaskQueueStats.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, java.lang.Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<TaskQueueStats.Builder>
-
clearField
public TaskQueueStats.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<TaskQueueStats.Builder>
-
clearOneof
public TaskQueueStats.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- 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, java.lang.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, java.lang.Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<TaskQueueStats.Builder>
-
mergeFrom
public TaskQueueStats.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<TaskQueueStats.Builder>
-
mergeFrom
public TaskQueueStats.Builder mergeFrom(TaskQueueStats other)
-
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 java.io.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:
java.io.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
public TaskQueueStats.Builder setApproximateBacklogCount(long value)
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
public TaskQueueStats.Builder 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
public TaskQueueStats.Builder 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. 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
public TaskQueueStats.Builder mergeApproximateBacklogAge(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. 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
public TaskQueueStats.Builder 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
public TaskQueueStats.Builder setTasksAddRate(float value)
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
public TaskQueueStats.Builder 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
public TaskQueueStats.Builder setTasksDispatchRate(float value)
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
public TaskQueueStats.Builder 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.
-
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>
-
-