public class StatefulFunctions
extends java.lang.Object
StatefulFunction
s. A RequestReplyHandler
can be created
from the registry that understands how to dispatch invocation requests to the registered
functions as well as encode side-effects (e.g., sending messages to other functions or updating
values in storage) as the response.Constructor and Description |
---|
StatefulFunctions() |
Modifier and Type | Method and Description |
---|---|
java.util.Map<TypeName,StatefulFunctionSpec> |
functionSpecs() |
RequestReplyHandler |
requestReplyHandler()
Creates a
RequestReplyHandler that understands how to dispatch invocation requests to
the registered functions as well as encode side-effects (e.g., sending messages to other
functions or updating values in storage) as the response. |
StatefulFunctions |
withStatefulFunction(StatefulFunctionSpec.Builder builder)
Registers a
StatefulFunctionSpec builder, which will be used to build the function
spec. |
StatefulFunctions |
withStatefulFunction(StatefulFunctionSpec spec)
Registers a
StatefulFunctionSpec . |
public StatefulFunctions withStatefulFunction(StatefulFunctionSpec.Builder builder)
StatefulFunctionSpec
builder, which will be used to build the function
spec.builder
- a builder for the function spec to register.java.lang.IllegalArgumentException
- if multiple StatefulFunctionSpec
under the same TypeName
have been registered.public StatefulFunctions withStatefulFunction(StatefulFunctionSpec spec)
StatefulFunctionSpec
.spec
- the function spec to register.java.lang.IllegalArgumentException
- if multiple StatefulFunctionSpec
under the same TypeName
have been registered.public java.util.Map<TypeName,StatefulFunctionSpec> functionSpecs()
StatefulFunctionSpec
s.public RequestReplyHandler requestReplyHandler()
RequestReplyHandler
that understands how to dispatch invocation requests to
the registered functions as well as encode side-effects (e.g., sending messages to other
functions or updating values in storage) as the response.RequestReplyHandler
for the registered functions.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.