public class JedisContainer extends Object implements JedisCommandsInstanceContainer
Container for managing Jedis instances.
Constructor and Description |
---|
JedisContainer(redis.clients.jedis.JedisPool jedisPool)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Release Container
|
redis.clients.jedis.JedisCommands |
getInstance()
Borrows instance from container.
|
void |
returnInstance(redis.clients.jedis.JedisCommands jedisCommands)
Returns instance to container.
|
public JedisContainer(redis.clients.jedis.JedisPool jedisPool)
Constructor
jedisPool
- JedisPool which actually manages Jedis instancespublic redis.clients.jedis.JedisCommands getInstance()
Borrows instance from container.
getInstance
in interface JedisCommandsInstanceContainer
public void returnInstance(redis.clients.jedis.JedisCommands jedisCommands)
Returns instance to container.
returnInstance
in interface JedisCommandsInstanceContainer
jedisCommands
- borrowed instancepublic void close()
Release Container
close
in interface Closeable
close
in interface AutoCloseable
close
in interface JedisCommandsInstanceContainer
Copyright © 2019 The Apache Software Foundation. All Rights Reserved.