Class RedisClusterState
java.lang.Object
org.apache.storm.redis.trident.state.RedisClusterState
- All Implemented Interfaces:
State
Implementation of State for Redis Cluster environment.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
RedisClusterState.Factory implements StateFactory for Redis Cluster environment. -
Constructor Summary
ConstructorDescriptionRedisClusterState
(redis.clients.jedis.JedisCluster jedisCluster) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
beginCommit
(Long someLong) void
redis.clients.jedis.JedisCluster
Borrows JedisCluster instance.void
returnJedisCluster
(redis.clients.jedis.JedisCluster jedisCluster) Returns JedisCluster instance to pool.
-
Constructor Details
-
RedisClusterState
public RedisClusterState(redis.clients.jedis.JedisCluster jedisCluster) Constructor.- Parameters:
jedisCluster
- JedisCluster
-
-
Method Details
-
beginCommit
- Specified by:
beginCommit
in interfaceState
-
commit
-
getJedisCluster
public redis.clients.jedis.JedisCluster getJedisCluster()Borrows JedisCluster instance.Note that you should return borrowed instance when you finish using instance.
- Returns:
- JedisCluster instance
-
returnJedisCluster
public void returnJedisCluster(redis.clients.jedis.JedisCluster jedisCluster) Returns JedisCluster instance to pool.- Parameters:
jedisCluster
- JedisCluster instance to return to pool
-