Class AbstractRedisMapState<T>
java.lang.Object
org.apache.storm.redis.trident.state.AbstractRedisMapState<T>
- Type Parameters:
- T- value's type class
- All Implemented Interfaces:
- IBackingMap<T>
- Direct Known Subclasses:
- RedisClusterMapState,- RedisMapState
AbstractRedisMapState is base class of any RedisMapState, which implements IBackingMap.
 
 Derived classes should provide
- which Serializer it uses
- which KeyFactory it uses
- how to retrieve values from Redis
- how to store values to Redis
and AbstractRedisMapState takes care of rest things.
- which Serializer it uses
- which KeyFactory it uses
- how to retrieve values from Redis
- how to store values to Redis
and AbstractRedisMapState takes care of rest things.
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected abstract KeyFactoryReturns KeyFactory which is used for converting state key -> Redis key.protected abstract SerializerReturns Serializer which is used for serializing tuple value and deserializing Redis value.voidretrieveValuesFromRedis(List<String> keys) Retrieves values from Redis that each value is corresponding to each key.protected abstract voidupdateStatesToRedis(Map<String, String> keyValues) Updates (key, value) pairs to Redis.
- 
Field Details- 
DEFAULT_SERIALIZERS
 
- 
- 
Constructor Details- 
AbstractRedisMapStatepublic AbstractRedisMapState()
 
- 
- 
Method Details- 
multiGet- Specified by:
- multiGetin interface- IBackingMap<T>
 
- 
multiPut- Specified by:
- multiPutin interface- IBackingMap<T>
 
- 
getSerializerReturns Serializer which is used for serializing tuple value and deserializing Redis value.- Returns:
- serializer
 
- 
getKeyFactoryReturns KeyFactory which is used for converting state key -> Redis key.- Returns:
- key factory
 
- 
retrieveValuesFromRedisRetrieves values from Redis that each value is corresponding to each key.- Parameters:
- keys- keys having state values
- Returns:
- values which are corresponding to keys
 
- 
updateStatesToRedisUpdates (key, value) pairs to Redis.- Parameters:
- keyValues- (key, value) pairs
 
 
-