RecoverableJedisPool
Encapsulation of JedisPool which supports AutoCloseable semantics for Jedis instance operations and connection pool recovery (e.g. when all connections of the pool cannot be used).
All methods in this class is thread-safe.
Properties
Functions
Link copied to clipboard
Creates a JedisPool using the current, active configuration.
Link copied to clipboard
Recreates the Jedis connection pool.
Link copied to clipboard
Resets the current pool by invoking AutoCloseable.close on the pool, then recreating the pool using the currently active configuration.
Link copied to clipboard
Similar to resetPool, but closes the old pool in a coroutine to avoid blocking the executing thread.
Link copied to clipboard
Link copied to clipboard
suspend fun <T> useConnectionSuspend(context: CoroutineContext = Dispatchers.IO, block: suspend (Jedis) -> T): T
Similar to useConnection, but executes block in a coroutine context.