Class RedisStateUpdater
java.lang.Object
org.apache.storm.trident.operation.BaseOperation
org.apache.storm.trident.state.BaseStateUpdater<T>
org.apache.storm.redis.trident.state.AbstractRedisStateUpdater<RedisState>
org.apache.storm.redis.trident.state.RedisStateUpdater
- All Implemented Interfaces:
Serializable
,Operation
,StateUpdater<RedisState>
BaseStateUpdater implementation for single Redis environment.
- See Also:
-
Field Summary
Fields inherited from class org.apache.storm.redis.trident.state.AbstractRedisStateUpdater
additionalKey, dataType, expireIntervalSec
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
updateStatesToRedis
(RedisState redisState, 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, updateState
Methods inherited from class org.apache.storm.trident.operation.BaseOperation
cleanup, prepare
-
Constructor Details
-
RedisStateUpdater
Constructor.- Parameters:
storeMapper
- mapper for storing
-
-
Method Details
-
withExpire
Sets expire (time to live) if needed.- Parameters:
expireIntervalSec
- time to live in seconds- Returns:
- RedisStateUpdater itself
-
updateStatesToRedis
Updates (key, value) pairs to Redis.- Specified by:
updateStatesToRedis
in classAbstractRedisStateUpdater<RedisState>
- Parameters:
redisState
- State for handling querykeyToValue
- (key, value) pairs
-