Package swiss.trustbroker.config.dto
Class StateCacheProperties.StateCachePropertiesBuilder
java.lang.Object
swiss.trustbroker.config.dto.StateCacheProperties.StateCachePropertiesBuilder
- Enclosing class:
StateCacheProperties
-
Method Summary
Modifier and TypeMethodDescriptionbuild()minSessionLifetimeSec(int minSessionLifetimeSec) Prevents collecting sessions related to a pending login.reapMaxDelaySec(int reapMaxDelaySec) Delay at most 25 sec randomly to allow multiple reapers on the same session DB.reapSchedule(String reapSchedule) Use by scheduled job checking for expired sessions and delete them from the session DB StateCache.reapWarnThresholdMs(int reapWarnThresholdMs) Expected reap cycle execution in milliseconds before we start to WARN about bad performance.schemaMigration(boolean schemaMigration) State cache schema migration.targetMaxEntries(int targetMaxEntries) If the session DB runs full (more than targetMaxEntries), XTB starts garbage collecting sessions, that might expire anyway soon to make room for new sessions and prevent storage issues.toString()txCommitDelay(int txCommitDelay) Delay before transaction commit in milliseconds.txRetryCount(int txRetryCount) Number of retries doubling the txRetryDelayMs on every try.txRetryDelayMs(int txRetryDelayMs) Delay before transaction retry in milliseconds (negative values indicate no retry).
-
Method Details
-
targetMaxEntries
If the session DB runs full (more than targetMaxEntries), XTB starts garbage collecting sessions, that might expire anyway soon to make room for new sessions and prevent storage issues.- Returns:
this.
-
minSessionLifetimeSec
public StateCacheProperties.StateCachePropertiesBuilder minSessionLifetimeSec(int minSessionLifetimeSec) Prevents collecting sessions related to a pending login.- Returns:
this.
-
reapSchedule
Use by scheduled job checking for expired sessions and delete them from the session DB StateCache. When multiple pods are running the reapMaxDelaySec is used to randomly delay the reaping to reduce concurrent work on the same data.
Cron expression, default is '30 * * * * *' which means run every 60sec at HH:MM:30- Returns:
this.
-
reapMaxDelaySec
Delay at most 25 sec randomly to allow multiple reapers on the same session DB.- Returns:
this.
-
reapWarnThresholdMs
public StateCacheProperties.StateCachePropertiesBuilder reapWarnThresholdMs(int reapWarnThresholdMs) Expected reap cycle execution in milliseconds before we start to WARN about bad performance.
Default: 10000- Returns:
this.
-
txCommitDelay
Delay before transaction commit in milliseconds. For testing race conditions only, do not set in production environments!
Default: 0- Returns:
this.
-
txRetryDelayMs
Delay before transaction retry in milliseconds (negative values indicate no retry).
Default: -1- Returns:
this.- Since:
- 1.9.0
-
txRetryCount
Number of retries doubling the txRetryDelayMs on every try.
Default: 0- Returns:
this.- Since:
- 1.10.0
-
schemaMigration
State cache schema migration. Currently unused.
Default: true- Returns:
this.
-
build
-
toString
-