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 property | The defaults. |
Tm1Timeouts constructor | Timeouts in milliseconds. |
connect property | |
login property | |
request property | |
close property | |
refusedLogin property | |
defaults static | The defaults (DEFAULTS). |
builder static | A builder starting from the defaults. |
toBuilder | A builder starting from these timeouts, to change some of them. |
equals | Whether other has the same timeouts (Java's record equality). |
toString | The timeouts, for logs. |
DEFAULTS
propertystatic DEFAULTSThe 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
constructorconstructor( 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
refusedLoginis negative
connect
propertyreadonly connect: numberlogin
propertyreadonly login: numberrequest
propertyreadonly request: numberclose
propertyreadonly close: numberrefusedLogin
propertyreadonly refusedLogin: numberdefaults
staticstatic defaults(): Tm1TimeoutsThe defaults (DEFAULTS).
builder
staticstatic builder(): Tm1Timeouts.BuilderA builder starting from the defaults.
toBuilder
toBuilder(): Tm1Timeouts.BuilderA builder starting from these timeouts, to change some of them.
equals
equals(other: unknown): booleanWhether other has the same timeouts (Java's record equality).
toString
toString(): stringThe timeouts, for logs.