R - The type of reference used to project data into output tuples in the context.F - The type of ProducerFunction wrapped by the context.public static class ProducerFunctionContext.Builder<R,F extends ProducerFunction> extends FunctionContext.Builder<F>
ProducerFunctionContext.| Constructor and Description |
|---|
Builder()
Create a
Builder to configure a new ProducerFunctionContext. |
Builder(ProducerFunctionContext<R,F> context)
Create a
Builder to configure a ProducerFunctionContext. |
| Modifier and Type | Method and Description |
|---|---|
ProducerFunctionContext<R,F> |
build()
Build the
FunctionContext configured by this Builder. |
ProducerFunctionContext.Builder<R,F> |
execute(F function)
Sets the
Function to be wrapped by the context and returns this
Builder for further configuration. |
ProducerFunctionContext<R,F> |
getContext()
Get the
FunctionContext configured by this Builder. |
boolean |
isProjected()
Tests whether the projection references have been configured.
|
ProducerFunctionContext.Builder<R,F> |
project(R... newProjection)
Sets the references to be used by the
ProducerFunctionContext to project
output data and returns this Builder for further configuration. |
isExecutedpublic Builder()
Builder to configure a new ProducerFunctionContext.public Builder(ProducerFunctionContext<R,F> context)
Builder to configure a ProducerFunctionContext.context - ProducerFunctionContext to be configured.public ProducerFunctionContext.Builder<R,F> execute(F function)
FunctionContext.BuilderFunction to be wrapped by the context and returns this
Builder for further configuration.execute in class FunctionContext.Builder<F extends ProducerFunction>function - Function to be wrapped by the context.Builder.public ProducerFunctionContext.Builder<R,F> project(R... newProjection)
ProducerFunctionContext to project
output data and returns this Builder for further configuration.newProjection - References to project data into an output Tuple.Builder.public boolean isProjected()
project(R...) is called, then true.public ProducerFunctionContext<R,F> build()
FunctionContext.BuilderFunctionContext configured by this Builder.build in class FunctionContext.Builder<F extends ProducerFunction>FunctionContextpublic ProducerFunctionContext<R,F> getContext()
FunctionContext.BuildergetContext in class FunctionContext.Builder<F extends ProducerFunction>FunctionContextCopyright © 2017. All rights reserved.