public final class StatefulFunctionDataStreamBuilder
extends java.lang.Object
This builder allows defining all the aspects of a stateful function application. define input streams as ingresses, define function providers and egress ids.
Modifier and Type | Method and Description |
---|---|
StatefulFunctionEgressStreams |
build(org.apache.flink.streaming.api.environment.StreamExecutionEnvironment env)
Adds Stateful Functions operators into the topology.
|
static StatefulFunctionDataStreamBuilder |
builder(java.lang.String pipelineName)
Creates a
StatefulFunctionDataStreamBuilder . |
StatefulFunctionDataStreamBuilder |
withConfiguration(StatefulFunctionsConfig configuration)
Set a stateful function configuration.
|
StatefulFunctionDataStreamBuilder |
withDataStreamAsIngress(org.apache.flink.streaming.api.datastream.DataStream<RoutableMessage> ingress)
Adds an ingress of incoming messages.
|
StatefulFunctionDataStreamBuilder |
withEgressId(EgressIdentifier<?> egressId)
Registers an
EgressIdentifier . |
StatefulFunctionDataStreamBuilder |
withFunctionProvider(FunctionType functionType,
SerializableStatefulFunctionProvider provider)
Adds a function provider to this builder
|
StatefulFunctionDataStreamBuilder |
withRequestReplyRemoteFunction(RequestReplyFunctionBuilder builder)
Adds a remote RequestReply type of function provider to this builder.
|
public static StatefulFunctionDataStreamBuilder builder(java.lang.String pipelineName)
StatefulFunctionDataStreamBuilder
.public StatefulFunctionDataStreamBuilder withDataStreamAsIngress(org.apache.flink.streaming.api.datastream.DataStream<RoutableMessage> ingress)
ingress
- an incoming stream of messages.public StatefulFunctionDataStreamBuilder withFunctionProvider(FunctionType functionType, SerializableStatefulFunctionProvider provider)
functionType
- the type of the function that this provider providers.provider
- the stateful function provider.public StatefulFunctionDataStreamBuilder withRequestReplyRemoteFunction(RequestReplyFunctionBuilder builder)
builder
- an already configured RequestReplyFunctionBuilder
.public StatefulFunctionDataStreamBuilder withEgressId(EgressIdentifier<?> egressId)
EgressIdentifier
.
See StatefulFunctionEgressStreams.getDataStreamForEgressId(EgressIdentifier)
.
egressId
- an ingress idpublic StatefulFunctionDataStreamBuilder withConfiguration(StatefulFunctionsConfig configuration)
configuration
- the stateful function configuration to set.public StatefulFunctionEgressStreams build(org.apache.flink.streaming.api.environment.StreamExecutionEnvironment env)
env
- the stream execution environment.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.