Class RedisMapState<T>

    • Constructor Detail

      • RedisMapState

        public RedisMapState​(redis.clients.jedis.JedisPool jedisPool,
                             Options options,
                             Serializer<T> serializer,
                             KeyFactory keyFactory)
        Constructor.
        Parameters:
        jedisPool - JedisPool
        options - options of State
        serializer - Serializer
        keyFactory - KeyFactory
    • Method Detail

      • opaque

        public static StateFactory opaque​(JedisPoolConfig jedisPoolConfig)
        Provides StateFactory for opaque transactional.
        Parameters:
        jedisPoolConfig - configuration for JedisPool
        Returns:
        StateFactory
      • opaque

        public static StateFactory opaque​(JedisPoolConfig jedisPoolConfig,
                                          RedisDataTypeDescription dataTypeDescription)
        Provides StateFactory for opaque transactional.
        Parameters:
        jedisPoolConfig - configuration for JedisPool
        dataTypeDescription - definition of data type
        Returns:
        StateFactory
      • opaque

        public static StateFactory opaque​(JedisPoolConfig jedisPoolConfig,
                                          KeyFactory factory)
        Provides StateFactory for opaque transactional.
        Parameters:
        jedisPoolConfig - configuration for JedisPool
        factory - key factory
        Returns:
        StateFactory
      • opaque

        public static StateFactory opaque​(JedisPoolConfig jedisPoolConfig,
                                          Options<OpaqueValue> opts)
        Provides StateFactory for opaque transactional.
        Parameters:
        jedisPoolConfig - configuration for JedisPool
        opts - options of State
        Returns:
        StateFactory
      • transactional

        public static StateFactory transactional​(JedisPoolConfig jedisPoolConfig)
        Provides StateFactory for transactional.
        Parameters:
        jedisPoolConfig - configuration for JedisPool
        Returns:
        StateFactory
      • transactional

        public static StateFactory transactional​(JedisPoolConfig jedisPoolConfig,
                                                 RedisDataTypeDescription dataTypeDescription)
        Provides StateFactory for transactional.
        Parameters:
        jedisPoolConfig - configuration for JedisPool
        dataTypeDescription - definition of data type
        Returns:
        StateFactory
      • transactional

        public static StateFactory transactional​(JedisPoolConfig jedisPoolConfig,
                                                 KeyFactory factory)
        Provides StateFactory for transactional.
        Parameters:
        jedisPoolConfig - configuration for JedisPool
        factory - key factory
        Returns:
        StateFactory
      • transactional

        public static StateFactory transactional​(JedisPoolConfig jedisPoolConfig,
                                                 Options<TransactionalValue> opts)
        Provides StateFactory for transactional.
        Parameters:
        jedisPoolConfig - configuration for JedisPool
        opts - options of State
        Returns:
        StateFactory
      • nonTransactional

        public static StateFactory nonTransactional​(JedisPoolConfig jedisPoolConfig)
        Provides StateFactory for non transactional.
        Parameters:
        jedisPoolConfig - configuration for JedisPool
        Returns:
        StateFactory
      • nonTransactional

        public static StateFactory nonTransactional​(JedisPoolConfig jedisPoolConfig,
                                                    RedisDataTypeDescription dataTypeDescription)
        Provides StateFactory for non transactional.
        Parameters:
        jedisPoolConfig - configuration for JedisPool
        dataTypeDescription - definition of data type
        Returns:
        StateFactory
      • nonTransactional

        public static StateFactory nonTransactional​(JedisPoolConfig jedisPoolConfig,
                                                    KeyFactory factory)
        Provides StateFactory for non transactional.
        Parameters:
        jedisPoolConfig - configuration for JedisPool
        factory - key factory
        Returns:
        StateFactory
      • nonTransactional

        public static StateFactory nonTransactional​(JedisPoolConfig jedisPoolConfig,
                                                    Options<Object> opts)
        Provides StateFactory for non transactional.
        Parameters:
        jedisPoolConfig - configuration for JedisPool
        opts - options of State
        Returns:
        StateFactory
      • getSerializer

        protected Serializer getSerializer()
        Returns Serializer which is used for serializing tuple value and deserializing Redis value.
        Specified by:
        getSerializer in class AbstractRedisMapState<T>
        Returns:
        serializer
      • retrieveValuesFromRedis

        protected List<String> retrieveValuesFromRedis​(List<String> keys)
        Retrieves values from Redis that each value is corresponding to each key.
        Specified by:
        retrieveValuesFromRedis in class AbstractRedisMapState<T>
        Parameters:
        keys - keys having state values
        Returns:
        values which are corresponding to keys