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

## Class RedisState

- java.lang.Object
- - org.apache.storm.redis.trident.state.RedisState

- All Implemented Interfaces:
    `State`

      public class RedisState
      extends Object
      implements State

  Implementation of State for single Redis environment.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `RedisState.Factory` | RedisState.Factory implements StateFactory for single Redis environment.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `RedisState​(redis.clients.jedis.JedisPool jedisPool)` | Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `beginCommit​(Long someLong)`
    `void` | `commit​(Long someLong)`
    `redis.clients.jedis.Jedis` | `getJedis()` | Borrows Jedis instance from pool.
    `void` | `returnJedis​(redis.clients.jedis.Jedis jedis)` | Returns Jedis instance to pool.

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

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

- - ### Constructor Detail

    - #### RedisState

          public RedisState​(redis.clients.jedis.JedisPool jedisPool)

      Constructor.
      Parameters:
        `jedisPool` - JedisPool

  - ### Method Detail

    - #### beginCommit

          public void beginCommit​(Long someLong)

      Specified by:
        `beginCommit` in interface `State`

    - #### commit

          public void commit​(Long someLong)

      Specified by:
        `commit` in interface `State`

    - #### getJedis

          public redis.clients.jedis.Jedis getJedis()

      Borrows Jedis instance from pool.

      Note that you should return borrowed instance to pool when you finish using instance.
      Returns:
        Jedis instance

    - #### returnJedis

          public void returnJedis​(redis.clients.jedis.Jedis jedis)

      Returns Jedis instance to pool.
      Parameters:
        `jedis` - Jedis instance to return to pool