T - The type of the element handled by this RedisMapperpublic interface RedisMapper<T> extends org.apache.flink.api.common.functions.Function, Serializable
Example:
private static class RedisTestMapper implements RedisMapper<Tuple2<String, String>> {
public RedisDataTypeDescription getCommandDescription() {
return new RedisDataTypeDescription(RedisCommand.PUBLISH);
}
public String getKeyFromData(Tuple2<String, String> data) {
return data.f0;
}
public String getValueFromData(Tuple2<String, String> data) {
return data.f1;
}
}
| 限定符和类型 | 方法和说明 |
|---|---|
RedisCommandDescription |
getCommandDescription()
Returns descriptor which defines data type.
|
String |
getKeyFromData(T data)
Extracts key from data.
|
String |
getValueFromData(T data)
Extracts value from data.
|
RedisCommandDescription getCommandDescription()
Copyright © 2023–2024. All rights reserved.