@Experimental(value=CONTEXTFUL) public final class Contextful<ClosureT> extends java.lang.Object implements java.io.Serializable
Requirements
needed to run it.Modifier and Type | Class and Description |
---|---|
static interface |
Contextful.Fn<InputT,OutputT>
A function from an input to an output that may additionally access
Contextful.Fn.Context when
computing the result. |
Modifier and Type | Method and Description |
---|---|
static <InputT,OutputT> |
fn(Contextful.Fn<InputT,OutputT> fn,
Requirements requirements)
Same with
of(ClosureT, org.apache.beam.sdk.transforms.Requirements) but with better type inference behavior for the case of Contextful.Fn . |
static <InputT,OutputT> |
fn(SerializableFunction<InputT,OutputT> fn)
|
ClosureT |
getClosure()
Returns the closure.
|
Requirements |
getRequirements()
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.
|
java.lang.String |
toString() |
public ClosureT getClosure()
public Requirements getRequirements()
public static <ClosureT> Contextful<ClosureT> of(ClosureT closure, Requirements requirements)
public java.lang.String toString()
toString
in class java.lang.Object
public static <InputT,OutputT> Contextful<Contextful.Fn<InputT,OutputT>> fn(SerializableFunction<InputT,OutputT> fn)
public static <InputT,OutputT> Contextful<Contextful.Fn<InputT,OutputT>> fn(Contextful.Fn<InputT,OutputT> fn, Requirements requirements)
of(ClosureT, org.apache.beam.sdk.transforms.Requirements)
but with better type inference behavior for the case of Contextful.Fn
.