newRedisClient
fun newRedisClient(redisUrl: String = defaultRedisUrl, maxPoolSize: Int = System.getProperty(REDIS_MAX_POOL_SIZE)?.toInt() ?: 10, maxIdleSize: Int = System.getProperty(REDIS_MAX_IDLE_SIZE)?.toInt() ?: 5, minIdleSize: Int = System.getProperty(REDIS_MIN_IDLE_SIZE)?.toInt() ?: 1, maxWaitSecs: Long = System.getProperty(REDIS_MAX_WAIT_SECS)?.toLong() ?: 1L): RedisClient
Creates a new pooled RedisClient with the given configuration.
Each pool parameter defaults to its system property (see REDIS_MAX_POOL_SIZE, etc.) if set, otherwise to the concrete fallback noted below. The connection and socket timeouts both use Jedis' DEFAULT_TIMEOUT.
Return
a configured RedisClient with connection pooling
Parameters
redisUrl
the Redis connection URL (defaults to the REDIS_URL environment variable)
maxPoolSize
maximum connections in the pool; defaults to the REDIS_MAX_POOL_SIZE property or 10
maxIdleSize
maximum idle connections; defaults to the REDIS_MAX_IDLE_SIZE property or 5
minIdleSize
minimum idle connections; defaults to the REDIS_MIN_IDLE_SIZE property or 1
maxWaitSecs
seconds to wait when borrowing a connection; defaults to the REDIS_MAX_WAIT_SECS property or 1