Record Class Tm1Timeouts
java.lang.Object
java.lang.Record
io.skipcheck.tm1.client.session.Tm1Timeouts
- Record Components:
connect- how long to wait for a connection, including TLS. Default 10 s.login- how 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- how long a request may go without receiving any data, unless the request sets its own timeout. This is 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- how long to wait for TM1 to close the session. Default 5 s.refusedLogin- how 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.
public record Tm1Timeouts(Duration connect, Duration login, Duration request, Duration close, Duration refusedLogin)
extends Record
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
Tm1Timeouts timeouts = Tm1Timeouts.builder().request(Duration.ofHours(2)).build();
A builder leaves unset values at the defaults below.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Tm1Timeouts.Builderbuilder()A builder starting from the defaults.close()Returns the value of thecloserecord component.connect()Returns the value of theconnectrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.login()Returns the value of theloginrecord component.Returns the value of therefusedLoginrecord component.request()Returns the value of therequestrecord component.A builder starting from these timeouts, to change some of them.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULTS
The defaults.
-
-
Constructor Details
-
Tm1Timeouts
-
-
Method Details
-
builder
A builder starting from the defaults.- Returns:
- a new builder
-
toBuilder
A builder starting from these timeouts, to change some of them.- Returns:
- a new builder
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
connect
-
login
-
request
-
close
-
refusedLogin
Returns the value of therefusedLoginrecord component.- Returns:
- the value of the
refusedLoginrecord component
-