Interface ProcessFunction<InputT,OutputT>

Type Parameters:
InputT - input value type
OutputT - output value type
All Superinterfaces:
Serializable
All Known Subinterfaces:
CheckStopReadingFn, ElasticsearchIO.Write.BooleanFieldValueExtractFn, ElasticsearchIO.Write.FieldValueExtractFn, KuduIO.FormatFunction<T>, SerializableFunction<InputT,OutputT>
All Known Implementing Classes:
AggregationQuery, BeamRowToBigtableMutation.ToBigtableRowFn, BeamSetOperatorsTransforms.BeamSqlRow2KvFn, BigtableReadSchemaTransformProvider.BigtableRowToBeamRow, BigtableWriteSchemaTransformProvider.GetMutationsFromBeamRow, CheckStopReadingFnWrapper, ExternalWrite.ParsePubsubMessageProtoAsPayloadFromWindowedValue, FindQuery, HealthcareIOErrorToTableRow, InferableFunction, JdbcIO.DataSourceProviderFromDataSourceConfiguration, JdbcIO.PoolableDataSourceProvider, Neo4jIO.DriverProviderFromDriverConfiguration, PAssert.MatcherCheckerFn, PubsubMessages.DeserializeBytesIntoPubsubMessagePayloadOnly, PubsubMessages.ParsePayloadAsPubsubMessageProto, PubsubMessages.ParsePubsubMessageProtoAsPayload, SimpleFunction, SnowflakeIO.DataSourceProviderFromDataSourceConfiguration, SqsReadSchemaTransformProvider.SqsMessageToBeamRow, WithFailures.ExceptionAsMapHandler, WithFailures.ThrowableHandler, WordCount.FormatAsTextFn
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ProcessFunction<InputT,OutputT> extends Serializable
A function that computes an output value of type OutputT from an input value of type InputT and is Serializable.

This is the most general function type provided in this SDK, allowing arbitrary Exceptions 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.

  • Method Summary

    Modifier and Type
    Method
    Description
    apply(InputT input)
    Returns the result of invoking this function on the given input.