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

# Class RedisClusterStateUpdater

java.lang.Object
org.apache.storm.trident.operation.BaseOperation
org.apache.storm.trident.state.BaseStateUpdater<T>
org.apache.storm.redis.trident.state.AbstractRedisStateUpdater<RedisClusterState>
org.apache.storm.redis.trident.state.RedisClusterStateUpdater

All Implemented Interfaces:
  `Serializable`, `Operation`, `StateUpdater<RedisClusterState>`

public class RedisClusterStateUpdater extends AbstractRedisStateUpdater<RedisClusterState>
BaseStateUpdater implementation for Redis Cluster environment.

See Also:
  - `AbstractRedisStateUpdater`
  - Serialized Form

- ## Field Summary

  ### Fields inherited from class org.apache.storm.redis.trident.state.AbstractRedisStateUpdater

  `additionalKey, dataType, expireIntervalSec`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RedisClusterStateUpdater(RedisStoreMapper storeMapper)`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `updateStatesToRedis(RedisClusterState redisClusterState, Map<String,String> keyToValue)`
  Updates (key, value) pairs to Redis.
  `RedisClusterStateUpdater`
  `withExpire(int expireIntervalSec)`
  Sets expire (time to live) if needed.

  ### Methods inherited from class org.apache.storm.redis.trident.state.AbstractRedisStateUpdater

  `setExpireInterval, updateState`

  ### Methods inherited from class org.apache.storm.trident.operation.BaseOperation

  `cleanup, prepare`

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

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

  ### Methods inherited from interface org.apache.storm.trident.operation.Operation

  `cleanup, prepare`

- ## Constructor Details

  - ### RedisClusterStateUpdater

    public RedisClusterStateUpdater(RedisStoreMapper storeMapper)
    Constructor.
    Parameters:
      `storeMapper` - mapper for storing

- ## Method Details

  - ### withExpire

    public RedisClusterStateUpdater withExpire(int expireIntervalSec)
    Sets expire (time to live) if needed.
    Parameters:
      `expireIntervalSec` - time to live in seconds
    Returns:
      RedisClusterStateUpdater itself

  - ### updateStatesToRedis

    protected void updateStatesToRedis(RedisClusterState redisClusterState, Map<String,String> keyToValue)
    Updates (key, value) pairs to Redis.
    Specified by:
      `updateStatesToRedis` in class `AbstractRedisStateUpdater<RedisClusterState>`
    Parameters:
      `redisClusterState` - State for handling query
      `keyToValue` - (key, value) pairs