平面地图
将单个输入记录映射到一个或多个输出记录。
Redis 堆栈 |
---|
public <I extends java.io.Serializable> GearsBuilder<I> flatMap(
gears.operations.FlatMapOperation<T,I> flatmapper)
Maps a single input record to one or more output records.
The FlatMap operation must return an Iterable
. RedisGears
splits the elements from the Iterable
object and processes them as individual records.
Parameters
Type parameters:
Name
Description
I
The template type of the returned builder object
Function parameters:
Name
Type
Description
flatmapper
FlatMapOperation<T,I>
For each input record, returns one or more output records
Returns
Returns a GearsBuilder object with a new template type.
Example
GearsBuilder.CreateGearsBuilder(reader).flatMap(r->{
return r.getListVal();
});
On this page