skipcheck

TM1 client · Docs · Sessions and logins

Tm1Timeouts

import { Tm1Timeouts } from "@skipcheck/tm1-client";

How long the session waits, by kind of work. TM1 answers some calls only when the work is done, so one timeout for everything is either too short for processes or too long for a login.

// Let a request go two hours without data, for a long process run synchronously
const timeouts = Tm1Timeouts.builder()
  .request(2 * 60 * 60 * 1000)
  .build();

A builder leaves unset values at the defaults below.

Members

DEFAULTS propertyThe defaults.
Tm1Timeouts constructorTimeouts in milliseconds.
connect property
login property
request property
close property
refusedLogin property
defaults staticThe defaults (DEFAULTS).
builder staticA builder starting from the defaults.
toBuilderA builder starting from these timeouts, to change some of them.
equalsWhether other has the same timeouts (Java's record equality).
toStringThe timeouts, for logs.

DEFAULTS

property
static DEFAULTS

The defaults: 10 s to connect, 30 s for a login, 10 minutes for a request, 5 s for the close, and a refused login remembered for 30 s.

Tm1Timeouts

constructor
constructor( readonly connect: number, readonly login: number, readonly request: number, readonly close: number, readonly refusedLogin: number, )

Timeouts in milliseconds. connect: for a connection, including TLS. login: for a login response; short, because a login does no work. The authenticator gets as long again to supply the credentials first. request: how long a request may go without receiving any data; long, because TM1 answers a process or a big view only when it's done. It's an idle timeout, not a limit on the whole response, so a large collection that keeps arriving isn't cut off (with a transport that calls Tm1HttpRequest.received, as fetchTransport does). close: for the logout at the end. refusedLogin: how long a refused login is remembered; zero to try every time.

Throws

RangeError if one isn't positive, or refusedLogin is negative

connect

property
readonly connect: number

login

property
readonly login: number

request

property
readonly request: number

close

property
readonly close: number

refusedLogin

property
readonly refusedLogin: number

defaults

static
static defaults(): Tm1Timeouts

The defaults (DEFAULTS).

builder

static
static builder(): Tm1Timeouts.Builder

A builder starting from the defaults.

toBuilder

toBuilder(): Tm1Timeouts.Builder

A builder starting from these timeouts, to change some of them.

equals

equals(other: unknown): boolean

Whether other has the same timeouts (Java's record equality).

toString

toString(): string

The timeouts, for logs.