Class RedisContainer
java.lang.Object
org.apache.storm.redis.common.container.RedisContainer
- All Implemented Interfaces:
Closeable
,AutoCloseable
,RedisCommandsInstanceContainer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Borrows instance from container.void
returnInstance
(RedisCommands redisCommands) Returns instance to container.
-
Constructor Details
-
RedisContainer
public RedisContainer(redis.clients.jedis.JedisPool jedisPool) Constructor.- Parameters:
jedisPool
- JedisPool which actually manages Jedis instances
-
-
Method Details
-
getInstance
Borrows instance from container.- Specified by:
getInstance
in interfaceRedisCommandsInstanceContainer
- Returns:
- instance which implements RedisCommands
-
returnInstance
Returns instance to container.- Specified by:
returnInstance
in interfaceRedisCommandsInstanceContainer
- Parameters:
redisCommands
- borrowed instance
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-