Skip to main content

Class: RetryPolicy

coresdk.common.RetryPolicy

Represents a RetryPolicy.

Implements

Constructors

constructor

new RetryPolicy(properties?)

Constructs a new RetryPolicy.

Parameters

NameType
properties?IRetryPolicy

Properties

backoffCoefficient

backoffCoefficient: number

RetryPolicy backoffCoefficient.

Implementation of

IRetryPolicy.backoffCoefficient


initialInterval

Optional initialInterval: null | IDuration

RetryPolicy initialInterval.

Implementation of

IRetryPolicy.initialInterval


maximumAttempts

maximumAttempts: number

RetryPolicy maximumAttempts.

Implementation of

IRetryPolicy.maximumAttempts


maximumInterval

Optional maximumInterval: null | IDuration

RetryPolicy maximumInterval.

Implementation of

IRetryPolicy.maximumInterval


nonRetryableErrorTypes

nonRetryableErrorTypes: string[]

RetryPolicy nonRetryableErrorTypes.

Implementation of

IRetryPolicy.nonRetryableErrorTypes

Methods

toJSON

toJSON(): Object

Converts this RetryPolicy to JSON.

Returns

Object

JSON object


create

Static create(properties?): RetryPolicy

Creates a new RetryPolicy instance using the specified properties.

Parameters

NameType
properties?IRetryPolicy

Returns

RetryPolicy

RetryPolicy instance


decode

Static decode(reader, length?): RetryPolicy

Decodes a RetryPolicy message from the specified reader or buffer.

throws {Error} If the payload is not a reader or valid buffer

throws {$protobuf.util.ProtocolError} If required fields are missing

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?number-

Returns

RetryPolicy

RetryPolicy


decodeDelimited

Static decodeDelimited(reader): RetryPolicy

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

throws {Error} If the payload is not a reader or valid buffer

throws {$protobuf.util.ProtocolError} If required fields are missing

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

RetryPolicy

RetryPolicy


encode

Static encode(message, writer?): Writer

Encodes the specified RetryPolicy message. Does not implicitly {@link coresdk.common.RetryPolicy.verify|verify} messages.

Parameters

NameTypeDescription
messageIRetryPolicyRetryPolicy message or plain object to encode
writer?Writer-

Returns

Writer

Writer


encodeDelimited

Static encodeDelimited(message, writer?): Writer

Encodes the specified RetryPolicy message, length delimited. Does not implicitly {@link coresdk.common.RetryPolicy.verify|verify} messages.

Parameters

NameTypeDescription
messageIRetryPolicyRetryPolicy message or plain object to encode
writer?Writer-

Returns

Writer

Writer


fromObject

Static fromObject(object): RetryPolicy

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

Parameters

NameTypeDescription
objectObjectPlain object

Returns

RetryPolicy

RetryPolicy


toObject

Static toObject(message, options?): Object

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

Parameters

NameTypeDescription
messageRetryPolicyRetryPolicy
options?IConversionOptions-

Returns

Object

Plain object