Table of Contents

Class WorkerHostInfo

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

Holds everything needed to identify the worker host/process context

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

Constructors

WorkerHostInfo()

public WorkerHostInfo()

WorkerHostInfo(WorkerHostInfo)

public WorkerHostInfo(WorkerHostInfo other)

Parameters

other WorkerHostInfo

Fields

CurrentHostCpuUsageFieldNumber

Field number for the "current_host_cpu_usage" field.

public const int CurrentHostCpuUsageFieldNumber = 3

Field Value

int

CurrentHostMemUsageFieldNumber

Field number for the "current_host_mem_usage" field.

public const int CurrentHostMemUsageFieldNumber = 4

Field Value

int

HostNameFieldNumber

Field number for the "host_name" field.

public const int HostNameFieldNumber = 1

Field Value

int

ProcessIdFieldNumber

Field number for the "process_id" field.

public const int ProcessIdFieldNumber = 2

Field Value

int

Properties

CurrentHostCpuUsage

System used CPU as a float in the range [0.0, 1.0] where 1.0 is defined as all cores on the host pegged.

public float CurrentHostCpuUsage { get; set; }

Property Value

float

CurrentHostMemUsage

System used memory as a float in the range [0.0, 1.0] where 1.0 is defined as all available memory on the host is used.

public float CurrentHostMemUsage { get; set; }

Property Value

float

Descriptor

public static MessageDescriptor Descriptor { get; }

Property Value

MessageDescriptor

HostName

Worker host identifier.

public string HostName { get; set; }

Property Value

string

Parser

public static MessageParser<WorkerHostInfo> Parser { get; }

Property Value

MessageParser<WorkerHostInfo>

ProcessId

Worker process identifier, should be unique for the host.

public string ProcessId { get; set; }

Property Value

string

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 WorkerHostInfo Clone()

Returns

WorkerHostInfo

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(WorkerHostInfo)

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

public bool Equals(WorkerHostInfo other)

Parameters

other WorkerHostInfo

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(WorkerHostInfo)

Merges the given message into this one.

public void MergeFrom(WorkerHostInfo other)

Parameters

other WorkerHostInfo

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.