Package org.apache.beam.sdk.transforms
Class Contextful<ClosureT>
java.lang.Object
org.apache.beam.sdk.transforms.Contextful<ClosureT>
- All Implemented Interfaces:
Serializable
Pair of a bit of user code (a "closure") and the
Requirements needed to run it.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA function from an input to an output that may additionally accessContextful.Fn.Contextwhen computing the result. -
Method Summary
Modifier and TypeMethodDescriptionstatic <InputT,OutputT>
Contextful<Contextful.Fn<InputT, OutputT>> fn(Contextful.Fn<InputT, OutputT> fn, Requirements requirements) Same withof(ClosureT, org.apache.beam.sdk.transforms.Requirements)but with better type inference behavior for the case ofContextful.Fn.static <InputT,OutputT>
Contextful<Contextful.Fn<InputT, OutputT>> fn(ProcessFunction<InputT, OutputT> fn) static <InputT,OutputT>
Contextful<Contextful.Fn<InputT, OutputT>> fn(SerializableFunction<InputT, OutputT> fn) Binary compatibility adapter forfn(ProcessFunction).Returns the closure.Returns the requirements needed to run the closure.static <ClosureT> Contextful<ClosureT> of(ClosureT closure, Requirements requirements) Constructs a pair of the given closure and its requirements.toString()
-
Method Details
-
getClosure
Returns the closure. -
getRequirements
Returns the requirements needed to run the closure. -
of
Constructs a pair of the given closure and its requirements. -
toString
-
fn
public static <InputT,OutputT> Contextful<Contextful.Fn<InputT,OutputT>> fn(ProcessFunction<InputT, OutputT> fn) -
fn
public static <InputT,OutputT> Contextful<Contextful.Fn<InputT,OutputT>> fn(SerializableFunction<InputT, OutputT> fn) Binary compatibility adapter forfn(ProcessFunction). -
fn
public static <InputT,OutputT> Contextful<Contextful.Fn<InputT,OutputT>> fn(Contextful.Fn<InputT, OutputT> fn, Requirements requirements) Same withof(ClosureT, org.apache.beam.sdk.transforms.Requirements)but with better type inference behavior for the case ofContextful.Fn.
-