public static final class StatefulFunctionSpec.Builder
extends java.lang.Object
StatefulFunctionSpec
.Modifier and Type | Method and Description |
---|---|
StatefulFunctionSpec |
build()
Builds the
StatefulFunctionSpec . |
StatefulFunctionSpec.Builder |
withSupplier(java.util.function.Supplier<? extends StatefulFunction> supplier)
|
StatefulFunctionSpec.Builder |
withValueSpec(ValueSpec<?> valueSpec)
Registers a
ValueSpec that will be used by this function. |
StatefulFunctionSpec.Builder |
withValueSpecs(ValueSpec<?>... valueSpecs)
Registers multiple
ValueSpec s that will be used by this function. |
public StatefulFunctionSpec.Builder withValueSpec(ValueSpec<?> valueSpec)
ValueSpec
that will be used by this function. A function may only access
values which have a registered ValueSpec
.valueSpec
- the value spec to register.java.lang.IllegalArgumentException
- if multiple ValueSpec
s with the same name was
registered.public StatefulFunctionSpec.Builder withValueSpecs(ValueSpec<?>... valueSpecs)
ValueSpec
s that will be used by this function. A function may only
access values which have a registered ValueSpec
.valueSpecs
- the value specs to register.java.lang.IllegalArgumentException
- if multiple ValueSpec
s with the same name was
registered.public StatefulFunctionSpec.Builder withSupplier(java.util.function.Supplier<? extends StatefulFunction> supplier)
supplier
- the supplier.public StatefulFunctionSpec build()
StatefulFunctionSpec
.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.