skipcheck

TM1 client · Docs · Sessions and logins

Tm1SessionPoolBuilder

using Skipcheck.Tm1.Client.Session;

Builds a Tm1SessionPool.

Members

IdleTimeoutHow long a session may go unused before it's evicted (default 10 minutes).
MaxAgeHow long a session may stay open, used or not (default 8 hours).
MaxSizeHow many sessions the pool holds (default 100); past it, the least recently used is evicted.
CloseGraceHow long an evicted session stays open before it's closed, for a caller that got it just before and hasn't sent its request yet.
SweepIntervalHow often the pool evicts expired sessions on its own (default a minute).
TimeProviderThe clock and timers the pool runs on (Java's scheduler), for tests.
BuildThe pool.

IdleTimeout

Tm1SessionPoolBuilder IdleTimeout(TimeSpan idleTimeout)

How long a session may go unused before it's evicted (default 10 minutes). Keep it under TM1's own session timeout, or TM1 drops the session first.

MaxAge

Tm1SessionPoolBuilder MaxAge(TimeSpan maxAge)

How long a session may stay open, used or not (default 8 hours): bounds how long a revoked user's session lives on.

MaxSize

Tm1SessionPoolBuilder MaxSize(int maxSize)

How many sessions the pool holds (default 100); past it, the least recently used is evicted.

CloseGrace

Tm1SessionPoolBuilder CloseGrace(TimeSpan closeGrace)

How long an evicted session stays open before it's closed, for a caller that got it just before and hasn't sent its request yet. A session with a request running stays open until that finishes, however long the grace period. Default 30 seconds; zero closes at once.

SweepInterval

Tm1SessionPoolBuilder SweepInterval(TimeSpan sweepInterval)

How often the pool evicts expired sessions on its own (default a minute).

TimeProvider

Tm1SessionPoolBuilder TimeProvider(TimeProvider timeProvider)

The clock and timers the pool runs on (Java's scheduler), for tests.

Build

Tm1SessionPool Build()

The pool. It starts its sweep at once, and opens sessions only when asked.