T
- value's type classpublic class RedisClusterMapState<T> extends AbstractRedisMapState<T>
AbstractRedisMapState
Modifier and Type | Class and Description |
---|---|
protected static class |
RedisClusterMapState.Factory
RedisClusterMapState.Factory provides Redis Cluster environment version of StateFactory.
|
DEFAULT_SERIALIZERS
Constructor and Description |
---|
RedisClusterMapState(redis.clients.jedis.JedisCluster jedisCluster,
Options options,
Serializer<T> serializer,
KeyFactory keyFactory)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected KeyFactory |
getKeyFactory()
Returns KeyFactory which is used for converting state key -> Redis key.
|
protected Serializer |
getSerializer()
Returns Serializer which is used for serializing tuple value and deserializing Redis value.
|
static StateFactory |
nonTransactional(JedisClusterConfig jedisClusterConfig)
Provides StateFactory for non transactional.
|
static StateFactory |
nonTransactional(JedisClusterConfig jedisClusterConfig,
KeyFactory factory)
Provides StateFactory for non transactional.
|
static StateFactory |
nonTransactional(JedisClusterConfig jedisClusterConfig,
Options<Object> opts)
Provides StateFactory for non transactional.
|
static StateFactory |
nonTransactional(JedisClusterConfig jedisClusterConfig,
RedisDataTypeDescription dataTypeDescription)
Provides StateFactory for non transactional.
|
static StateFactory |
opaque(JedisClusterConfig jedisClusterConfig)
Provides StateFactory for opaque transactional.
|
static StateFactory |
opaque(JedisClusterConfig jedisClusterConfig,
KeyFactory factory)
Provides StateFactory for opaque transactional.
|
static StateFactory |
opaque(JedisClusterConfig jedisClusterConfig,
Options<OpaqueValue> opts)
Provides StateFactory for opaque transactional.
|
static StateFactory |
opaque(JedisClusterConfig jedisClusterConfig,
RedisDataTypeDescription dataTypeDescription)
Provides StateFactory for opaque transactional.
|
protected List<String> |
retrieveValuesFromRedis(List<String> keys)
Retrieves values from Redis that each value is corresponding to each key.
|
static StateFactory |
transactional(JedisClusterConfig jedisClusterConfig)
Provides StateFactory for transactional.
|
static StateFactory |
transactional(JedisClusterConfig jedisClusterConfig,
KeyFactory factory)
Provides StateFactory for transactional.
|
static StateFactory |
transactional(JedisClusterConfig jedisClusterConfig,
Options<TransactionalValue> opts)
Provides StateFactory for transactional.
|
static StateFactory |
transactional(JedisClusterConfig jedisClusterConfig,
RedisDataTypeDescription dataTypeDescription)
Provides StateFactory for transactional.
|
protected void |
updateStatesToRedis(Map<String,String> keyValues)
Updates (key, value) pairs to Redis.
|
multiGet, multiPut
public RedisClusterMapState(redis.clients.jedis.JedisCluster jedisCluster, Options options, Serializer<T> serializer, KeyFactory keyFactory)
jedisCluster
- JedisClusteroptions
- options of Stateserializer
- SerializerkeyFactory
- KeyFactorypublic static StateFactory opaque(JedisClusterConfig jedisClusterConfig)
jedisClusterConfig
- configuration for JedisClusterpublic static StateFactory opaque(JedisClusterConfig jedisClusterConfig, RedisDataTypeDescription dataTypeDescription)
jedisClusterConfig
- configuration for JedisClusterdataTypeDescription
- definition of data typepublic static StateFactory opaque(JedisClusterConfig jedisClusterConfig, KeyFactory factory)
jedisClusterConfig
- configuration for JedisClusterfactory
- key factorypublic static StateFactory opaque(JedisClusterConfig jedisClusterConfig, Options<OpaqueValue> opts)
jedisClusterConfig
- configuration for JedisClusteropts
- options of Statepublic static StateFactory transactional(JedisClusterConfig jedisClusterConfig)
jedisClusterConfig
- configuration for JedisClusterpublic static StateFactory transactional(JedisClusterConfig jedisClusterConfig, RedisDataTypeDescription dataTypeDescription)
jedisClusterConfig
- configuration for JedisClusterdataTypeDescription
- definition of data typepublic static StateFactory transactional(JedisClusterConfig jedisClusterConfig, KeyFactory factory)
jedisClusterConfig
- configuration for JedisClusterfactory
- key factorypublic static StateFactory transactional(JedisClusterConfig jedisClusterConfig, Options<TransactionalValue> opts)
jedisClusterConfig
- configuration for JedisClusteropts
- options of Statepublic static StateFactory nonTransactional(JedisClusterConfig jedisClusterConfig)
jedisClusterConfig
- configuration for JedisClusterpublic static StateFactory nonTransactional(JedisClusterConfig jedisClusterConfig, RedisDataTypeDescription dataTypeDescription)
jedisClusterConfig
- configuration for JedisClusterdataTypeDescription
- definition of data typepublic static StateFactory nonTransactional(JedisClusterConfig jedisClusterConfig, KeyFactory factory)
jedisClusterConfig
- configuration for JedisClusterfactory
- key factorypublic static StateFactory nonTransactional(JedisClusterConfig jedisClusterConfig, Options<Object> opts)
jedisClusterConfig
- configuration for JedisClusteropts
- options of Stateprotected Serializer getSerializer()
getSerializer
in class AbstractRedisMapState<T>
protected KeyFactory getKeyFactory()
getKeyFactory
in class AbstractRedisMapState<T>
protected List<String> retrieveValuesFromRedis(List<String> keys)
retrieveValuesFromRedis
in class AbstractRedisMapState<T>
keys
- keys having state valuesprotected void updateStatesToRedis(Map<String,String> keyValues)
updateStatesToRedis
in class AbstractRedisMapState<T>
keyValues
- (key, value) pairsCopyright © 2023 The Apache Software Foundation. All rights reserved.