public final class StatefulFunctionsUniverse extends java.lang.Object implements StatefulFunctionModule.Binder, FlinkIoModule.Binder, ExtensionModule.Binder, ExtensionResolver
Constructor and Description |
---|
StatefulFunctionsUniverse(MessageFactoryKey messageFactoryKey) |
Modifier and Type | Method and Description |
---|---|
<T> void |
bindEgress(EgressSpec<T> spec)
Binds an
EgressSpec to the Stateful Functions application. |
<T> void |
bindExtension(TypeName typeName,
T extension) |
void |
bindFunctionProvider(FunctionTypeNamespaceMatcher namespaceMatcher,
StatefulFunctionProvider provider)
Binds a
StatefulFunctionProvider to the Stateful Functions application for all
functions under the specified namespace. |
void |
bindFunctionProvider(FunctionType functionType,
StatefulFunctionProvider provider)
Binds a
StatefulFunctionProvider to the Stateful Functions application for a specific
FunctionType . |
<T> void |
bindIngress(IngressSpec<T> spec)
Binds an
IngressSpec to the Stateful Functions application. |
<T> void |
bindIngressRouter(IngressIdentifier<T> ingressIdentifier,
Router<T> router)
Binds a
Router for a given ingress to the Stateful Functions application. |
void |
bindSinkProvider(EgressType type,
SinkProvider provider) |
void |
bindSourceProvider(IngressType type,
SourceProvider provider) |
java.util.Map<EgressIdentifier<?>,EgressSpec<?>> |
egress() |
java.util.Map<FunctionType,StatefulFunctionProvider> |
functions() |
java.util.Map<TypeName,java.lang.Object> |
getExtensions() |
java.util.Map<IngressIdentifier<?>,IngressSpec<?>> |
ingress() |
MessageFactoryKey |
messageFactoryKey() |
java.util.Map<java.lang.String,StatefulFunctionProvider> |
namespaceFunctions() |
<T> T |
resolveExtension(TypeName typeName,
java.lang.Class<T> extensionClass) |
java.util.Map<IngressIdentifier<?>,java.util.List<Router<?>>> |
routers() |
java.util.Map<EgressType,SinkProvider> |
sinks() |
java.util.Map<IngressType,SourceProvider> |
sources() |
StaticallyRegisteredTypes |
types() |
public StatefulFunctionsUniverse(MessageFactoryKey messageFactoryKey)
public <T> void bindIngress(IngressSpec<T> spec)
StatefulFunctionModule.Binder
IngressSpec
to the Stateful Functions application.bindIngress
in interface StatefulFunctionModule.Binder
T
- the output type of the ingress.spec
- the IngressSpec
to bind.public <T> void bindIngressRouter(IngressIdentifier<T> ingressIdentifier, Router<T> router)
StatefulFunctionModule.Binder
Router
for a given ingress to the Stateful Functions application.bindIngressRouter
in interface StatefulFunctionModule.Binder
T
- the type of messages that is being routed.ingressIdentifier
- the id of the ingress to bind the router to.router
- the router to bind.public <T> void bindEgress(EgressSpec<T> spec)
StatefulFunctionModule.Binder
EgressSpec
to the Stateful Functions application.bindEgress
in interface StatefulFunctionModule.Binder
T
- the type of inputs that the egress consumes.spec
- the EgressSpec
to bind.public void bindFunctionProvider(FunctionType functionType, StatefulFunctionProvider provider)
StatefulFunctionModule.Binder
StatefulFunctionProvider
to the Stateful Functions application for a specific
FunctionType
.bindFunctionProvider
in interface StatefulFunctionModule.Binder
functionType
- the type of functions that the StatefulFunctionProvider
provides.provider
- the provider to bind.public void bindFunctionProvider(FunctionTypeNamespaceMatcher namespaceMatcher, StatefulFunctionProvider provider)
StatefulFunctionModule.Binder
StatefulFunctionProvider
to the Stateful Functions application for all
functions under the specified namespace. If a provider was bound for a specific function type
using StatefulFunctionModule.Binder.bindFunctionProvider(FunctionType, StatefulFunctionProvider)
, that provider
would be used instead.bindFunctionProvider
in interface StatefulFunctionModule.Binder
namespaceMatcher
- matcher for the target namespace of functions that the StatefulFunctionProvider
provides.provider
- the provider to bind.public void bindSourceProvider(IngressType type, SourceProvider provider)
bindSourceProvider
in interface FlinkIoModule.Binder
public void bindSinkProvider(EgressType type, SinkProvider provider)
bindSinkProvider
in interface FlinkIoModule.Binder
public <T> void bindExtension(TypeName typeName, T extension)
bindExtension
in interface ExtensionModule.Binder
public <T> T resolveExtension(TypeName typeName, java.lang.Class<T> extensionClass)
resolveExtension
in interface ExtensionResolver
public java.util.Map<IngressIdentifier<?>,IngressSpec<?>> ingress()
public java.util.Map<EgressIdentifier<?>,EgressSpec<?>> egress()
public java.util.Map<IngressIdentifier<?>,java.util.List<Router<?>>> routers()
public java.util.Map<FunctionType,StatefulFunctionProvider> functions()
public java.util.Map<java.lang.String,StatefulFunctionProvider> namespaceFunctions()
public java.util.Map<IngressType,SourceProvider> sources()
public java.util.Map<EgressType,SinkProvider> sinks()
public java.util.Map<TypeName,java.lang.Object> getExtensions()
public StaticallyRegisteredTypes types()
public MessageFactoryKey messageFactoryKey()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.