Class AbstractRedisStateQuerier<T extends State>
java.lang.Object
org.apache.storm.trident.operation.BaseOperation
org.apache.storm.trident.state.BaseQueryFunction<T,List<Values>>
org.apache.storm.redis.trident.state.AbstractRedisStateQuerier<T>
- Type Parameters:
T
- type of State
- All Implemented Interfaces:
Serializable
,EachOperation
,Operation
,QueryFunction<T,
List<Values>>
- Direct Known Subclasses:
RedisClusterStateQuerier
,RedisStateQuerier
public abstract class AbstractRedisStateQuerier<T extends State>
extends BaseQueryFunction<T,List<Values>>
AbstractRedisStateQuerier is base class of any RedisStateQuerier, which implements BaseQueryFunction.
Derived classes should provide how to retrieve values from Redis,
and AbstractRedisStateQuerier takes care of rest things.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected final String
protected final RedisDataTypeDescription.RedisDataType
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbatchRetrieve
(T state, List<TridentTuple> inputs) void
execute
(TridentTuple tuple, List<Values> values, TridentCollector collector) retrieveValuesFromRedis
(T state, List<String> keys) Retrieves values from Redis that each value is corresponding to each key.Methods inherited from class org.apache.storm.trident.operation.BaseOperation
cleanup, prepare
-
Field Details
-
dataType
-
additionalKey
-
-
Constructor Details
-
AbstractRedisStateQuerier
Constructor.- Parameters:
lookupMapper
- mapper for querying
-
-
Method Details
-
batchRetrieve
-
execute
-
retrieveValuesFromRedis
Retrieves values from Redis that each value is corresponding to each key.- Parameters:
state
- State for handling querykeys
- keys having state values- Returns:
- values which are corresponding to keys
-