Class: WorkerSlotsInfo
Represents a WorkerSlotsInfo.
Implements
Constructors
constructor
• new WorkerSlotsInfo(properties?
): WorkerSlotsInfo
Constructs a new WorkerSlotsInfo.
Parameters
Name | Type | Description |
---|---|---|
properties? | IWorkerSlotsInfo | Properties to set |
Returns
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
Name | Type | Description |
---|---|---|
properties? | IWorkerSlotsInfo | Properties to set |
Returns
WorkerSlotsInfo instance
decode
▸ decode(reader
, length?
): WorkerSlotsInfo
Decodes a WorkerSlotsInfo message from the specified reader or buffer.
Parameters
Name | Type | Description |
---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
length? | number | Message length if known beforehand |
Returns
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
Name | Type | Description |
---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
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
Name | Type | Description |
---|---|---|
message | IWorkerSlotsInfo | WorkerSlotsInfo message or plain object to encode |
writer? | Writer | Writer 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
Name | Type | Description |
---|---|---|
message | IWorkerSlotsInfo | WorkerSlotsInfo message or plain object to encode |
writer? | Writer | Writer 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
Name | Type | Description |
---|---|---|
object | Object | Plain object |
Returns
WorkerSlotsInfo
getTypeUrl
▸ getTypeUrl(typeUrlPrefix?
): string
Gets the default type url for WorkerSlotsInfo
Parameters
Name | Type | Description |
---|---|---|
typeUrlPrefix? | string | your 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
Name | Type | Description |
---|---|---|
message | WorkerSlotsInfo | WorkerSlotsInfo |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object