public interface AddressScopedStorage
AddressScopedStorageis used for reading and writing persistent values that is managed by Stateful Functions for fault-tolerance and consistency.
All access to the storage is scoped to the current invoked function instance, identified by
Address. This means that within an invocation, function instances may only
access it's own persisted values through this storage.
<T> java.util.Optional<T> get(ValueSpec<T> spec)
T- the type of the value.
ValueSpecto read the value for.
Optional.empty()if there was not prior value set.
IllegalStorageAccessException- if the provided
ValueSpecis not recognized by the storage (e.g., if it wasn't registered for the accessing function).
<T> void set(ValueSpec<T> spec, T value)
<T> void remove(ValueSpec<T> spec)
ValueSpec, scoped to the current invoked
After removing the value, calling
get(ValueSpec) for the same spec will return an
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.