public class RedisContainer extends Object implements RedisCommandsInstanceContainer
Constructor and Description |
---|
RedisContainer(redis.clients.jedis.JedisPool jedisPool)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
RedisCommands |
getInstance()
Borrows instance from container.
|
void |
returnInstance(RedisCommands redisCommands)
Returns instance to container.
|
public RedisContainer(redis.clients.jedis.JedisPool jedisPool)
Constructor
jedisPool
- JedisPool which actually manages Jedis instancespublic 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.