Class RedisClusterContainer
- java.lang.Object
-
- org.apache.storm.redis.common.container.RedisClusterContainer
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,RedisCommandsInstanceContainer
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 Summary
Constructors Constructor Description RedisClusterContainer(redis.clients.jedis.JedisCluster jedisCluster)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
RedisCommands
getInstance()
Borrows instance from container.void
returnInstance(RedisCommands redisCommands)
Returns instance to container.
-
-
-
Method Detail
-
getInstance
public RedisCommands getInstance()
Borrows instance from container.- Specified by:
getInstance
in interfaceRedisCommandsInstanceContainer
- Returns:
- instance which implements RedisCommands
-
returnInstance
public void returnInstance(RedisCommands redisCommands)
Returns instance to container.- Specified by:
returnInstance
in interfaceRedisCommandsInstanceContainer
- Parameters:
redisCommands
- borrowed instance
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
-