InputT
- input value typeOutputT
- output value type@FunctionalInterface
public interface ProcessFunction<InputT,OutputT>
extends java.io.Serializable
OutputT
from an input value of type
InputT
and is Serializable
.
This is the most general function type provided in this SDK, allowing arbitrary Exception
s to be thrown, and matching Java's expectations of a functional interface that
can be supplied as a lambda expression or method reference. It is named ProcessFunction
because it is particularly appropriate anywhere a user needs to provide code that will eventually
be executed as part of a DoFn
ProcessElement
function, which is allowed to declare throwing Exception
. If you need to
execute user code in a context where arbitrary checked exceptions should not be allowed, require
that users implement the subinterface SerializableFunction
instead.
For more robust Coder
inference, consider extending
InferableFunction
rather than implementing this interface directly.
Modifier and Type | Method and Description |
---|---|
OutputT |
apply(InputT input)
Returns the result of invoking this function on the given input.
|