Class RedisClusterState

java.lang.Object
org.apache.storm.redis.trident.state.RedisClusterState
All Implemented Interfaces:
State

public class RedisClusterState extends Object implements State
Implementation of State for Redis Cluster environment.
  • Constructor Details

    • RedisClusterState

      public RedisClusterState(redis.clients.jedis.JedisCluster jedisCluster)
      Constructor.
      Parameters:
      jedisCluster - JedisCluster
  • Method Details

    • beginCommit

      public void beginCommit(Long someLong)
      Specified by:
      beginCommit in interface State
    • commit

      public void commit(Long someLong)
      Specified by:
      commit in interface State
    • 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