Class RedisStateUpdater

All Implemented Interfaces:
Serializable, Operation, StateUpdater<RedisState>

public class RedisStateUpdater extends AbstractRedisStateUpdater<RedisState>
BaseStateUpdater implementation for single Redis environment.
See Also:
  • Constructor Details

    • RedisStateUpdater

      public RedisStateUpdater(RedisStoreMapper storeMapper)
      Constructor.
      Parameters:
      storeMapper - mapper for storing
  • Method Details

    • withExpire

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

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