Class 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
     For workflow task queues, we only report the normal queue stats, not sticky queues. This means the stats
     reported here do not count all workflow tasks. However, because the tasks queued in sticky queues only remain
     valid for a few seconds, the inaccuracy becomes less significant as the backlog age grows.
     
    Protobuf type temporal.api.taskqueue.v1.TaskQueueStats
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<TaskQueueStats.Builder>
      • clear

        public TaskQueueStats.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<TaskQueueStats.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<TaskQueueStats.Builder>
      • getDefaultInstanceForType

        public TaskQueueStats getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public TaskQueueStats build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public TaskQueueStats buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public TaskQueueStats.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<TaskQueueStats.Builder>
      • setField

        public TaskQueueStats.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                               java.lang.Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<TaskQueueStats.Builder>
      • clearField

        public TaskQueueStats.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<TaskQueueStats.Builder>
      • clearOneof

        public TaskQueueStats.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.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:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TaskQueueStats.Builder>
      • addRepeatedField

        public TaskQueueStats.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                       java.lang.Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TaskQueueStats.Builder>
      • mergeFrom

        public TaskQueueStats.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<TaskQueueStats.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.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:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.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.
         
        int64 approximate_backlog_count = 1;
        Specified by:
        getApproximateBacklogCount in interface TaskQueueStatsOrBuilder
        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.
         
        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.
         
        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 create timestamp of the task at the head of the queue.
         
        .google.protobuf.Duration approximate_backlog_age = 2;
        Specified by:
        hasApproximateBacklogAge in interface TaskQueueStatsOrBuilder
        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 create timestamp of the task at the head of the queue.
         
        .google.protobuf.Duration approximate_backlog_age = 2;
        Specified by:
        getApproximateBacklogAge in interface TaskQueueStatsOrBuilder
        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 create timestamp of the task at the head of the queue.
         
        .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 create timestamp of the task at the head of the queue.
         
        .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 create timestamp of the task at the head of the queue.
         
        .google.protobuf.Duration approximate_backlog_age = 2;
      • clearApproximateBacklogAge

        public TaskQueueStats.Builder clearApproximateBacklogAge()
         Approximate age of the oldest task in the backlog based on the create timestamp of the task at the head of the queue.
         
        .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 create timestamp of the task at the head of the queue.
         
        .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 create timestamp of the task at the head of the queue.
         
        .google.protobuf.Duration approximate_backlog_age = 2;
        Specified by:
        getApproximateBacklogAgeOrBuilder in interface TaskQueueStatsOrBuilder
      • getTasksAddRate

        public float getTasksAddRate()
         Approximate tasks per second added to the task queue based on activity within a fixed window. This includes both backlogged and
         sync-matched tasks.
         
        float tasks_add_rate = 3;
        Specified by:
        getTasksAddRate in interface TaskQueueStatsOrBuilder
        Returns:
        The tasksAddRate.
      • setTasksAddRate

        public TaskQueueStats.Builder setTasksAddRate​(float value)
         Approximate tasks per second added to the task queue based on activity within a fixed window. This includes both backlogged and
         sync-matched tasks.
         
        float tasks_add_rate = 3;
        Parameters:
        value - The tasksAddRate to set.
        Returns:
        This builder for chaining.
      • clearTasksAddRate

        public TaskQueueStats.Builder clearTasksAddRate()
         Approximate tasks per second added to the task queue based on activity within a fixed window. This includes both backlogged and
         sync-matched tasks.
         
        float tasks_add_rate = 3;
        Returns:
        This builder for chaining.
      • getTasksDispatchRate

        public float getTasksDispatchRate()
         Approximate tasks per second dispatched to workers based on activity within a fixed window. This includes both backlogged and
         sync-matched tasks.
         
        float tasks_dispatch_rate = 4;
        Specified by:
        getTasksDispatchRate in interface TaskQueueStatsOrBuilder
        Returns:
        The tasksDispatchRate.
      • setTasksDispatchRate

        public TaskQueueStats.Builder setTasksDispatchRate​(float value)
         Approximate tasks per second dispatched to workers based on activity within a fixed window. This includes both backlogged and
         sync-matched tasks.
         
        float tasks_dispatch_rate = 4;
        Parameters:
        value - The tasksDispatchRate to set.
        Returns:
        This builder for chaining.
      • clearTasksDispatchRate

        public TaskQueueStats.Builder clearTasksDispatchRate()
         Approximate tasks per second dispatched to workers based on activity within a fixed window. This includes both backlogged and
         sync-matched tasks.
         
        float tasks_dispatch_rate = 4;
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final TaskQueueStats.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TaskQueueStats.Builder>
      • mergeUnknownFields

        public final TaskQueueStats.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TaskQueueStats.Builder>