public class JedisClusterContainer extends Object implements JedisCommandsInstanceContainer
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 |
---|
JedisClusterContainer(redis.clients.jedis.JedisCluster jedisCluster)
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 JedisClusterContainer(redis.clients.jedis.JedisCluster jedisCluster)
Constructor
jedisCluster
- JedisCluster instancepublic 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.