Tm1Timeouts
using Skipcheck.Tm1.Client.Session;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
var timeouts = Tm1Timeouts.Builder().Request(TimeSpan.FromHours(2)).Build();
A builder leaves unset values at the defaults below.
Members
Defaults static | The defaults. |
Tm1Timeouts constructor | Timeouts, each positive (or, for refusedLogin, not negative). |
Connect property | How long to wait for a connection, including TLS. |
Login property | How long to wait for a login response. |
Request property | How long a request may go without receiving any data, unless the request sets its own (Tm1Request{T}.WithTimeout). |
Close property | How long to wait for TM1 to close the session. |
RefusedLogin property | How long a login TM1 refused (wrong credentials, an unknown or disabled user, impersonation not allowed) is remembered. |
Builder static | A builder starting from the defaults. |
ToBuilder | A builder starting from these timeouts, to change some of them. |
Defaults
staticTm1Timeouts DefaultsThe defaults: 10 s to connect, 30 s for a login, 10 min without data for a request, 5 s to close, and a refused login remembered for 30 s.
Tm1Timeouts
constructorTm1Timeouts(TimeSpan connect, TimeSpan login, TimeSpan request, TimeSpan close, TimeSpan refusedLogin)Timeouts, each positive (or, for refusedLogin, not
negative).
Throws
ArgumentException- A timeout is out of range.
Connect
propertyTimeSpan ConnectHow long to wait for a connection, including TLS. Default 10 s.
Login
propertyTimeSpan LoginHow long to wait for a login response. Short, because a TM1 that is still loading accepts connections and never answers. The authenticator gets as long again to supply the credentials first, since it may ask another server, such as Cognos for a passport. Default 30 s.
Request
propertyTimeSpan RequestHow long a request may go without receiving any data, unless the request sets its
own (Tm1Request{T}.WithTimeout). An idle timeout, not a limit on the whole
response, so a large collection that keeps streaming isn't cut off. Default 10
min.
Close
propertyTimeSpan CloseHow long to wait for TM1 to close the session. Default 5 s.
RefusedLogin
propertyTimeSpan RefusedLoginHow long a login TM1 refused (wrong credentials, an unknown or disabled user, impersonation not allowed) is remembered. Until then, requests fail at once with the same error instead of logging in again: every attempt leaves a session behind on TM1, so retrying a refusal at once would pile them up. Zero turns this off. Default 30 s.
Builder
staticTimeoutsBuilder Builder()A builder starting from the defaults.
ToBuilder
TimeoutsBuilder ToBuilder()A builder starting from these timeouts, to change some of them.