T
- the type of the value.public final class ValueSpec<T>
extends java.lang.Object
ValueSpec
identifies a registered persistent value of a function, which will be managed
by the Stateful Functions runtime for consistency and fault-tolerance. A ValueSpec
is
registered for a function by configuring it on the function's assoicated StatefulFunctionSpec
.Modifier and Type | Class and Description |
---|---|
static class |
ValueSpec.Untyped |
Modifier and Type | Method and Description |
---|---|
Expiration |
expiration() |
java.lang.String |
name() |
static ValueSpec.Untyped |
named(java.lang.String name)
Creates an
ValueSpec.Untyped spec with the given name. |
Type<T> |
type() |
TypeName |
typeName() |
public static ValueSpec.Untyped named(java.lang.String name)
ValueSpec.Untyped
spec with the given name. To complete the creation of a ValueSpec
, please specify the Type
of the value. For example:
final ValueSpec<Integer> intValue = ValueSpec.named("my_int_state").withIntType();
The specified name string must be a valid identifier conforming to the following rules:
name
- name for the value. Please see the method Javadocs for format rules.ValueSpec.Untyped
spec. Specify the Type
of the value to instantiate a ValueSpec
.public java.lang.String name()
public Expiration expiration()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.