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
All Methods Instance Methods Concrete Methods 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
-
-
-
-
Constructor Detail
-
RedisClusterStateUpdater
public RedisClusterStateUpdater(RedisStoreMapper storeMapper)
Constructor.- Parameters:
storeMapper
- mapper for storing
-
-
Method Detail
-
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 classAbstractRedisStateUpdater<RedisClusterState>
- Parameters:
redisClusterState
- State for handling querykeyToValue
- (key, value) pairs
-
-