Tm1SessionPoolBuilder
from skipcheck_tm1 import Tm1SessionPoolBuilder Builds a Tm1SessionPool.
Members
__init__ constructor | |
idle_timeout | How long a session may go unused before it's evicted. |
max_age | How long a session may live, used or not. |
max_size | The most sessions the pool holds (default 100); beyond it, the least recently asked for is evicted, with a request running or not. |
close_grace | 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. |
sweep_interval | How often Tm1SessionPool.sweep_forever looks for expired sessions. |
clock | The pool's clock, in seconds (Java's scheduler). |
build | The pool. |
__init__
constructor__init__(sessions: Tm1SessionBuilder)idle_timeout
idle_timeout(idle_timeout: float | timedelta) -> Tm1SessionPoolBuilderHow long a session may go unused before it's evicted. Default 10 minutes; keep it below TM1's own session timeout.
max_age
max_age(max_age: float | timedelta) -> Tm1SessionPoolBuilderHow long a session may live, used or not. Default 8 hours. A session picks up security changes, such as new rights, only when it's new.
max_size
max_size(max_size: int) -> Tm1SessionPoolBuilderThe most sessions the pool holds (default 100); beyond it, the least recently asked for is evicted, with a request running or not: it leaves the pool, and is closed when its work is done. Evicted sessions in their grace period don't count.
close_grace
close_grace(close_grace: float | timedelta) -> Tm1SessionPoolBuilderHow 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 s; 0 closes at the next sweep.
sweep_interval
sweep_interval(sweep_interval: float | timedelta) -> Tm1SessionPoolBuilderHow often Tm1SessionPool.sweep_forever looks for expired sessions. Default 1 minute.
clock
clock(clock: Callable[[], float]) -> Tm1SessionPoolBuilderThe pool's clock, in seconds (Java's scheduler): tests pass one they move.
build
build() -> Tm1SessionPoolThe pool. It opens sessions only when asked.