R - The type of reference used to project data into output tuples in this context.F - The type of ProducerFunction wrapped by the context.public class ProducerFunctionContext<R,F extends ProducerFunction> extends FunctionContext<F>
ProducerFunctionContext wraps a ProducerFunction, and provides the
references to project the results produced by a function into an output Tuple.| Modifier and Type | Class and Description |
|---|---|
static class |
ProducerFunctionContext.Builder<R,F extends ProducerFunction>
Implementation of the Builder pattern for
ProducerFunctionContext. |
| Constructor and Description |
|---|
ProducerFunctionContext()
Default constructor - used for serialisation.
|
ProducerFunctionContext(F function,
List<R> projection)
Create a
ProducerFunctionContext that projects the results of the
ProducerFunction into output Tuples using the specified
projection references. |
| Modifier and Type | Method and Description |
|---|---|
List<R> |
getProjection() |
void |
project(Tuple<R> tuple,
Object[] values)
Project data into an output
Tuple. |
void |
setProjection(List<R> projection) |
getFunction, setFunctionpublic ProducerFunctionContext()
public ProducerFunctionContext(F function, List<R> projection)
ProducerFunctionContext that projects the results of the
ProducerFunction into output Tuples using the specified
projection references.function - ProducerFunction to be wrapped by the context.projection - References to project output data.Copyright © 2017. All rights reserved.