public class RedisStateUpdater extends AbstractRedisStateUpdater<RedisState>
BaseStateUpdater implementation for single Redis environment.
AbstractRedisStateUpdater
,
Serialized FormadditionalKey, dataType, expireIntervalSec
Constructor and Description |
---|
RedisStateUpdater(RedisStoreMapper storeMapper)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
updateStatesToRedis(RedisState redisState,
Map<String,String> keyToValue)
Updates (key, value) pairs to Redis.
|
RedisStateUpdater |
withExpire(int expireIntervalSec)
Sets expire (time to live) if needed.
|
setExpireInterval, updateState
cleanup, prepare
public RedisStateUpdater(RedisStoreMapper storeMapper)
Constructor.
storeMapper
- mapper for storingpublic RedisStateUpdater withExpire(int expireIntervalSec)
Sets expire (time to live) if needed.
expireIntervalSec
- time to live in secondsprotected void updateStatesToRedis(RedisState redisState, Map<String,String> keyToValue)
Updates (key, value) pairs to Redis.
updateStatesToRedis
in class AbstractRedisStateUpdater<RedisState>
redisState
- State for handling querykeyToValue
- (key, value) pairsCopyright © 2020 The Apache Software Foundation. All rights reserved.