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.

  • Field Details

    • DEFAULTS

      public static final Tm1Timeouts DEFAULTS
      The defaults.
  • Constructor Details

  • Method Details

    • builder

      public static Tm1Timeouts.Builder builder()
      A builder starting from the defaults.
      Returns:
      a new builder
    • toBuilder

      public Tm1Timeouts.Builder toBuilder()
      A builder starting from these timeouts, to change some of them.
      Returns:
      a new builder
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • connect

      public Duration connect()
      Returns the value of the connect record component.
      Returns:
      the value of the connect record component
    • login

      public Duration login()
      Returns the value of the login record component.
      Returns:
      the value of the login record component
    • request

      public Duration request()
      Returns the value of the request record component.
      Returns:
      the value of the request record component
    • close

      public Duration close()
      Returns the value of the close record component.
      Returns:
      the value of the close record component
    • refusedLogin

      public Duration refusedLogin()
      Returns the value of the refusedLogin record component.
      Returns:
      the value of the refusedLogin record component