Skip to main content

Class: PollerScalingDecision

Attached to task responses to give hints to the SDK about how it may adjust its number of pollers.

Properties​

pollRequestDeltaSuggestion​

pollRequestDeltaSuggestion: number

How many poll requests to suggest should be added or removed, if any. As of now, server only scales up or down by 1. However, SDKs should allow for other values (while staying within defined min/max).

The SDK is free to ignore this suggestion, EX: making more polls would not make sense because all slots are already occupied.

Methods​

toJSON()​

toJSON(): object

Converts this PollerScalingDecision to JSON.

Returns​

object

JSON object


create()​

Call Signature​

static create(properties?): PollerScalingDecision & $Properties

Creates a new PollerScalingDecision instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

PollerScalingDecision & $Properties

PollerScalingDecision instance

Call Signature​

static create(properties?): PollerScalingDecision

Creates a new PollerScalingDecision instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

PollerScalingDecision

PollerScalingDecision instance


decode()​

static decode(reader, length?): PollerScalingDecision & $Properties

Decodes a PollerScalingDecision message from the specified reader or buffer.

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

length?​

number

Message length if known beforehand

Returns​

PollerScalingDecision & $Properties

PollerScalingDecision

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


decodeDelimited()​

static decodeDelimited(reader): PollerScalingDecision & $Properties

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

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

Returns​

PollerScalingDecision & $Properties

PollerScalingDecision

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


encode()​

static encode(message, writer?): Writer

Encodes the specified PollerScalingDecision message. Does not implicitly temporal.api.taskqueue.v1.PollerScalingDecision.verify|verify messages.

Parameters​

message​

$Properties

PollerScalingDecision message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


encodeDelimited()​

static encodeDelimited(message, writer?): Writer

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

Parameters​

message​

$Properties

PollerScalingDecision message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


fromObject()​

static fromObject(object): PollerScalingDecision

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

Parameters​

object​

Plain object

Returns​

PollerScalingDecision

PollerScalingDecision


toObject()​

static toObject(message, options?): object

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

Parameters​

message​

PollerScalingDecision

PollerScalingDecision

options?​

IConversionOptions

Conversion options

Returns​

object

Plain object