Table of Contents

Class WorkerHeartbeat

Namespace
Temporalio.Api.Worker.V1
Assembly
Temporalio.dll

Worker info message, contains information about the worker and its current state. All information is provided by the worker itself. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: Removing those words make names less clear. --)

public sealed class WorkerHeartbeat : IMessage<WorkerHeartbeat>, IEquatable<WorkerHeartbeat>, IDeepCloneable<WorkerHeartbeat>, IBufferMessage, IMessage
Inheritance
WorkerHeartbeat
Implements
IMessage<WorkerHeartbeat>
IDeepCloneable<WorkerHeartbeat>
IBufferMessage
IMessage
Inherited Members

Constructors

WorkerHeartbeat()

public WorkerHeartbeat()

WorkerHeartbeat(WorkerHeartbeat)

public WorkerHeartbeat(WorkerHeartbeat other)

Parameters

other WorkerHeartbeat

Fields

ActivityPollerInfoFieldNumber

Field number for the "activity_poller_info" field.

public const int ActivityPollerInfoFieldNumber = 18

Field Value

int

ActivityTaskSlotsInfoFieldNumber

Field number for the "activity_task_slots_info" field.

public const int ActivityTaskSlotsInfoFieldNumber = 13

Field Value

int

CurrentStickyCacheSizeFieldNumber

Field number for the "current_sticky_cache_size" field.

public const int CurrentStickyCacheSizeFieldNumber = 22

Field Value

int

DeploymentVersionFieldNumber

Field number for the "deployment_version" field.

public const int DeploymentVersionFieldNumber = 5

Field Value

int

ElapsedSinceLastHeartbeatFieldNumber

Field number for the "elapsed_since_last_heartbeat" field.

public const int ElapsedSinceLastHeartbeatFieldNumber = 11

Field Value

int

HeartbeatTimeFieldNumber

Field number for the "heartbeat_time" field.

public const int HeartbeatTimeFieldNumber = 10

Field Value

int

HostInfoFieldNumber

Field number for the "host_info" field.

public const int HostInfoFieldNumber = 3

Field Value

int

LocalActivitySlotsInfoFieldNumber

Field number for the "local_activity_slots_info" field.

public const int LocalActivitySlotsInfoFieldNumber = 15

Field Value

int

NexusPollerInfoFieldNumber

Field number for the "nexus_poller_info" field.

public const int NexusPollerInfoFieldNumber = 19

Field Value

int

NexusTaskSlotsInfoFieldNumber

Field number for the "nexus_task_slots_info" field.

public const int NexusTaskSlotsInfoFieldNumber = 14

Field Value

int

SdkNameFieldNumber

Field number for the "sdk_name" field.

public const int SdkNameFieldNumber = 6

Field Value

int

SdkVersionFieldNumber

Field number for the "sdk_version" field.

public const int SdkVersionFieldNumber = 7

Field Value

int

StartTimeFieldNumber

Field number for the "start_time" field.

public const int StartTimeFieldNumber = 9

Field Value

int

StatusFieldNumber

Field number for the "status" field.

public const int StatusFieldNumber = 8

Field Value

int

TaskQueueFieldNumber

Field number for the "task_queue" field.

public const int TaskQueueFieldNumber = 4

Field Value

int

TotalStickyCacheHitFieldNumber

Field number for the "total_sticky_cache_hit" field.

public const int TotalStickyCacheHitFieldNumber = 20

Field Value

int

TotalStickyCacheMissFieldNumber

Field number for the "total_sticky_cache_miss" field.

public const int TotalStickyCacheMissFieldNumber = 21

Field Value

int

WorkerIdentityFieldNumber

Field number for the "worker_identity" field.

public const int WorkerIdentityFieldNumber = 2

Field Value

int

WorkerInstanceKeyFieldNumber

Field number for the "worker_instance_key" field.

public const int WorkerInstanceKeyFieldNumber = 1

Field Value

int

WorkflowPollerInfoFieldNumber

Field number for the "workflow_poller_info" field.

public const int WorkflowPollerInfoFieldNumber = 16

Field Value

int

WorkflowStickyPollerInfoFieldNumber

Field number for the "workflow_sticky_poller_info" field.

public const int WorkflowStickyPollerInfoFieldNumber = 17

Field Value

int

WorkflowTaskSlotsInfoFieldNumber

Field number for the "workflow_task_slots_info" field.

public const int WorkflowTaskSlotsInfoFieldNumber = 12

Field Value

int

Properties

ActivityPollerInfo

public WorkerPollerInfo ActivityPollerInfo { get; set; }

Property Value

WorkerPollerInfo

ActivityTaskSlotsInfo

public WorkerSlotsInfo ActivityTaskSlotsInfo { get; set; }

Property Value

WorkerSlotsInfo

CurrentStickyCacheSize

Current cache size, expressed in number of Workflow Executions.

public int CurrentStickyCacheSize { get; set; }

Property Value

int

DeploymentVersion

public WorkerDeploymentVersion DeploymentVersion { get; set; }

Property Value

WorkerDeploymentVersion

Descriptor

public static MessageDescriptor Descriptor { get; }

Property Value

MessageDescriptor

ElapsedSinceLastHeartbeat

Elapsed time since the last heartbeat from the worker.

public Duration ElapsedSinceLastHeartbeat { get; set; }

Property Value

Duration

HeartbeatTime

Timestamp of this heartbeat, coming from the worker. Worker should set it to "now". Note that this timestamp comes directly from the worker and is subject to workers' clock skew.

public Timestamp HeartbeatTime { get; set; }

Property Value

Timestamp

HostInfo

Worker host information.

public WorkerHostInfo HostInfo { get; set; }

Property Value

WorkerHostInfo

LocalActivitySlotsInfo

public WorkerSlotsInfo LocalActivitySlotsInfo { get; set; }

Property Value

WorkerSlotsInfo

NexusPollerInfo

public WorkerPollerInfo NexusPollerInfo { get; set; }

Property Value

WorkerPollerInfo

NexusTaskSlotsInfo

public WorkerSlotsInfo NexusTaskSlotsInfo { get; set; }

Property Value

WorkerSlotsInfo

Parser

public static MessageParser<WorkerHeartbeat> Parser { get; }

Property Value

MessageParser<WorkerHeartbeat>

SdkName

public string SdkName { get; set; }

Property Value

string

SdkVersion

public string SdkVersion { get; set; }

Property Value

string

StartTime

Worker start time. It can be used to determine worker uptime. (current time - start time)

public Timestamp StartTime { get; set; }

Property Value

Timestamp

Status

Worker status. Defined by SDK.

public WorkerStatus Status { get; set; }

Property Value

WorkerStatus

TaskQueue

Task queue this worker is polling for tasks.

public string TaskQueue { get; set; }

Property Value

string

TotalStickyCacheHit

A Workflow Task found a cached Workflow Execution to run against.

public int TotalStickyCacheHit { get; set; }

Property Value

int

TotalStickyCacheMiss

A Workflow Task did not find a cached Workflow execution to run against.

public int TotalStickyCacheMiss { get; set; }

Property Value

int

WorkerIdentity

Worker identity, set by the client, may not be unique. Usually host_name+(user group name)+process_id, but can be overwritten by the user.

public string WorkerIdentity { get; set; }

Property Value

string

WorkerInstanceKey

Worker identifier, should be unique for the namespace. It is distinct from worker identity, which is not necessarily namespace-unique.

public string WorkerInstanceKey { get; set; }

Property Value

string

WorkflowPollerInfo

public WorkerPollerInfo WorkflowPollerInfo { get; set; }

Property Value

WorkerPollerInfo

WorkflowStickyPollerInfo

public WorkerPollerInfo WorkflowStickyPollerInfo { get; set; }

Property Value

WorkerPollerInfo

WorkflowTaskSlotsInfo

public WorkerSlotsInfo WorkflowTaskSlotsInfo { get; set; }

Property Value

WorkerSlotsInfo

Methods

CalculateSize()

Calculates the size of this message in Protocol Buffer wire format, in bytes.

public int CalculateSize()

Returns

int

The number of bytes required to write this message to a coded output stream.

Clone()

Creates a deep clone of this object.

public WorkerHeartbeat Clone()

Returns

WorkerHeartbeat

A deep clone of this object.

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object other)

Parameters

other object

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Equals(WorkerHeartbeat)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(WorkerHeartbeat other)

Parameters

other WorkerHeartbeat

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

MergeFrom(CodedInputStream)

Merges the data from the specified coded input stream with the current message.

public void MergeFrom(CodedInputStream input)

Parameters

input CodedInputStream

Remarks

See the user guide for precise merge semantics.

MergeFrom(WorkerHeartbeat)

Merges the given message into this one.

public void MergeFrom(WorkerHeartbeat other)

Parameters

other WorkerHeartbeat

Remarks

See the user guide for precise merge semantics.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

WriteTo(CodedOutputStream)

Writes the data to the given coded output stream.

public void WriteTo(CodedOutputStream output)

Parameters

output CodedOutputStream

Coded output stream to write the data to. Must not be null.