Package org.apache.storm.redis.trident.state

# 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.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `RedisClusterState.Factory`
  RedisClusterState.Factory implements StateFactory for Redis Cluster environment.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RedisClusterState(redis.clients.jedis.JedisCluster jedisCluster)`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `beginCommit(Long someLong)`
  `void`
  `commit(Long someLong)`
  `redis.clients.jedis.JedisCluster`
  `getJedisCluster()`
  Borrows JedisCluster instance.
  `void`
  `returnJedisCluster(redis.clients.jedis.JedisCluster jedisCluster)`
  Returns JedisCluster instance to pool.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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