R - The type of reference used to select from and project into tuples in this context.F - The type of ConsumerProducerFunction wrapped by the context.public class ConsumerProducerFunctionContext<R,F extends ConsumerProducerFunction> extends ConsumerFunctionContext<R,F>
ConsumerProducerFunctionContext extends a ConsumerFunctionContext to
wrap a ConsumerProducerFunction and also provide the references to project the results
produced by the function into an output Tuple.| Modifier and Type | Class and Description |
|---|---|
static class |
ConsumerProducerFunctionContext.Builder<R,F extends ConsumerProducerFunction>
Implementation of the Builder pattern for
ConsumerProducerFunctionContext. |
| Constructor and Description |
|---|
ConsumerProducerFunctionContext()
Default constructor - used for serialisation.
|
ConsumerProducerFunctionContext(F function,
List<R> selection,
List<R> projection)
Create a
ConsumerProducerFunctionContext that wraps a
ConsumerProducerFunction, using the specified selection and 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) |
getSelection, select, setSelectiongetFunction, setFunctionpublic ConsumerProducerFunctionContext()
public ConsumerProducerFunctionContext(F function, List<R> selection, List<R> projection)
ConsumerProducerFunctionContext that wraps a
ConsumerProducerFunction, using the specified selection and projection references.function - ConsumerProducerFunction to be wrapped by the context.selection - References to select input data.projection - References to project output data.Copyright © 2017. All rights reserved.