Class RedisState
- java.lang.Object
-
- org.apache.storm.redis.trident.state.RedisState
-
-
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.
-
-
-
Method Detail
-
beginCommit
public void beginCommit(Long someLong)
- Specified by:
beginCommit
in interfaceState
-
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
-
-