public class RedisClusterContainer extends Object implements RedisCommandsInstanceContainer
Container for managing JedisCluster.
Note that JedisCluster doesn’t need to be pooled since it’s thread-safe and it stores pools internally.Constructor and Description |
---|
RedisClusterContainer(redis.clients.jedis.JedisCluster jedisCluster)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
RedisCommands |
getInstance()
Borrows instance from container.
|
void |
returnInstance(RedisCommands redisCommands)
Returns instance to container.
|
public RedisClusterContainer(redis.clients.jedis.JedisCluster jedisCluster)
Constructor
jedisCluster
- JedisCluster instancepublic RedisCommands getInstance()
Borrows instance from container.
getInstance
in interface RedisCommandsInstanceContainer
public void returnInstance(RedisCommands redisCommands)
Returns instance to container.
returnInstance
in interface RedisCommandsInstanceContainer
redisCommands
- borrowed instancepublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2019 The Apache Software Foundation. All Rights Reserved.