Skip to main content

Class: WorkerSlotsInfo

worker.v1.WorkerSlotsInfo

Represents a WorkerSlotsInfo.

Implements

Constructors

constructor

new WorkerSlotsInfo(properties?): WorkerSlotsInfo

Constructs a new WorkerSlotsInfo.

Parameters

NameTypeDescription
properties?IWorkerSlotsInfoProperties to set

Returns

WorkerSlotsInfo

Properties

currentAvailableSlots

currentAvailableSlots: number

Number of slots available for the worker to specific tasks. May be -1 if the upper bound is not known.

Implementation of

IWorkerSlotsInfo.currentAvailableSlots


currentUsedSlots

currentUsedSlots: number

Number of slots used by the worker for specific tasks.

Implementation of

IWorkerSlotsInfo.currentUsedSlots


lastIntervalFailureTasks

lastIntervalFailureTasks: number

Number of failed tasks processed since the last heartbeat from the worker.

Implementation of

IWorkerSlotsInfo.lastIntervalFailureTasks


lastIntervalProcessedTasks

lastIntervalProcessedTasks: number

Number of tasks processed in since the last heartbeat from the worker. This is a cumulative counter, and it is reset to 0 each time the worker sends a heartbeat. Contains both successful and failed tasks.

Implementation of

IWorkerSlotsInfo.lastIntervalProcessedTasks


slotSupplierKind

slotSupplierKind: string

Kind of the slot supplier, which is used to determine how the slots are allocated. Possible values: "Fixed | ResourceBased | Custom String"

Implementation of

IWorkerSlotsInfo.slotSupplierKind


totalFailedTasks

totalFailedTasks: number

Total number of failed tasks processed by the worker so far.

Implementation of

IWorkerSlotsInfo.totalFailedTasks


totalProcessedTasks

totalProcessedTasks: number

Total number of tasks processed (completed both successfully and unsuccesfully, or any other way) by the worker since the worker started. This is a cumulative counter.

Implementation of

IWorkerSlotsInfo.totalProcessedTasks

Methods

toJSON

toJSON(): Object

Converts this WorkerSlotsInfo to JSON.

Returns

Object

JSON object


create

create(properties?): WorkerSlotsInfo

Creates a new WorkerSlotsInfo instance using the specified properties.

Parameters

NameTypeDescription
properties?IWorkerSlotsInfoProperties to set

Returns

WorkerSlotsInfo

WorkerSlotsInfo instance


decode

decode(reader, length?): WorkerSlotsInfo

Decodes a WorkerSlotsInfo message from the specified reader or buffer.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?numberMessage length if known beforehand

Returns

WorkerSlotsInfo

WorkerSlotsInfo

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): WorkerSlotsInfo

Decodes a WorkerSlotsInfo message from the specified reader or buffer, length delimited.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

WorkerSlotsInfo

WorkerSlotsInfo

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


encode

encode(message, writer?): Writer

Encodes the specified WorkerSlotsInfo message. Does not implicitly temporal.api.worker.v1.WorkerSlotsInfo.verify|verify messages.

Parameters

NameTypeDescription
messageIWorkerSlotsInfoWorkerSlotsInfo message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

Encodes the specified WorkerSlotsInfo message, length delimited. Does not implicitly temporal.api.worker.v1.WorkerSlotsInfo.verify|verify messages.

Parameters

NameTypeDescription
messageIWorkerSlotsInfoWorkerSlotsInfo message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


fromObject

fromObject(object): WorkerSlotsInfo

Creates a WorkerSlotsInfo message from a plain object. Also converts values to their respective internal types.

Parameters

NameTypeDescription
objectObjectPlain object

Returns

WorkerSlotsInfo

WorkerSlotsInfo


getTypeUrl

getTypeUrl(typeUrlPrefix?): string

Gets the default type url for WorkerSlotsInfo

Parameters

NameTypeDescription
typeUrlPrefix?stringyour custom typeUrlPrefix(default "type.googleapis.com")

Returns

string

The default type url


toObject

toObject(message, options?): Object

Creates a plain object from a WorkerSlotsInfo message. Also converts values to other types if specified.

Parameters

NameTypeDescription
messageWorkerSlotsInfoWorkerSlotsInfo
options?IConversionOptionsConversion options

Returns

Object

Plain object