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>
BaseStateUpdater implementation for Redis Cluster environment.
- See Also:
-
Field Summary
Fields inherited from class org.apache.storm.redis.trident.state.AbstractRedisStateUpdater
additionalKey, dataType, expireIntervalSec -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidupdateStatesToRedis(RedisClusterState redisClusterState, Map<String, String> keyToValue) Updates (key, value) pairs to Redis.withExpire(int expireIntervalSec) Sets expire (time to live) if needed.Methods inherited from class org.apache.storm.redis.trident.state.AbstractRedisStateUpdater
setExpireInterval, updateStateMethods inherited from class org.apache.storm.trident.operation.BaseOperation
cleanup, prepare
-
Constructor Details
-
RedisClusterStateUpdater
Constructor.- Parameters:
storeMapper- mapper for storing
-
-
Method Details
-
withExpire
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:
updateStatesToRedisin classAbstractRedisStateUpdater<RedisClusterState>- Parameters:
redisClusterState- State for handling querykeyToValue- (key, value) pairs
-