Skip to main content

Class: PollerScalingDecision

taskqueue.v1.PollerScalingDecision

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

Implements

Constructors

constructor

new PollerScalingDecision(properties?): PollerScalingDecision

Constructs a new PollerScalingDecision.

Parameters

NameTypeDescription
properties?IPollerScalingDecisionProperties to set

Returns

PollerScalingDecision

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.

Implementation of

IPollerScalingDecision.pollRequestDeltaSuggestion

Methods

toJSON

toJSON(): Object

Converts this PollerScalingDecision to JSON.

Returns

Object

JSON object


create

create(properties?): PollerScalingDecision

Creates a new PollerScalingDecision instance using the specified properties.

Parameters

NameTypeDescription
properties?IPollerScalingDecisionProperties to set

Returns

PollerScalingDecision

PollerScalingDecision instance


decode

decode(reader, length?): PollerScalingDecision

Decodes a PollerScalingDecision message from the specified reader or buffer.

Parameters

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

Returns

PollerScalingDecision

PollerScalingDecision

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): PollerScalingDecision

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

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

PollerScalingDecision

PollerScalingDecision

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 PollerScalingDecision message. Does not implicitly temporal.api.taskqueue.v1.PollerScalingDecision.verify|verify messages.

Parameters

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

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

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

Parameters

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

Returns

Writer

Writer


fromObject

fromObject(object): PollerScalingDecision

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

Parameters

NameTypeDescription
objectObjectPlain object

Returns

PollerScalingDecision

PollerScalingDecision


getTypeUrl

getTypeUrl(typeUrlPrefix?): string

Gets the default type url for PollerScalingDecision

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 PollerScalingDecision message. Also converts values to other types if specified.

Parameters

NameTypeDescription
messagePollerScalingDecisionPollerScalingDecision
options?IConversionOptionsConversion options

Returns

Object

Plain object