← Back to Stormify Documentation

Package-level declarations

Types

Link copied to clipboard

Thrown by SuspendConnectionPool.use when PoolConfig.acquireTimeout elapses.

Link copied to clipboard
class PoolClosedException(message: String = "Connection pool is closed") : IllegalStateException

Thrown by SuspendConnectionPool.use when the pool has been SuspendConnectionPool.closed.

Link copied to clipboard
data class PoolConfig(val minConnections: Int = 2, val maxConnections: Int = 10, val acquireTimeout: Duration = 30.seconds, val idleTimeout: Duration = 5.minutes, val maxLifetime: Duration = 30.minutes, val cleanupInterval: Duration = 30.seconds, val validationQuery: String? = null, val validateAfterIdle: Duration = 10.seconds, val shutdownTimeout: Duration = 30.seconds)

Configuration for SuspendConnectionPool.

Link copied to clipboard
data class PoolStats(val total: Int, val inUse: Int, val idle: Int, val acquireCount: Long, val waitedAcquireCount: Long, val evictedCount: Long, val retiredCount: Long)

Snapshot of a SuspendConnectionPool's internal counters at a point in time.

Link copied to clipboard

Coroutine-aware wrapper around a Stormify instance.

Functions

Link copied to clipboard
fun Stormify.suspending(config: PoolConfig = PoolConfig()): SuspendStormify

Wraps this Stormify instance with a coroutine-aware transaction API backed by a DefaultSuspendConnectionPool configured with config. Safe to call multiple times with different configs; each returned SuspendStormify is independent.