Package org.apache.beam.sdk.state
Interface StateSpec<StateT extends State>
- Type Parameters:
StateT
- The type of state being described.
- All Superinterfaces:
Serializable
A specification of a persistent state cell. This includes information necessary to encode the
value and details about the intended access pattern.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
Cases for doing a "switch" on the type ofStateSpec
. -
Method Summary
Modifier and TypeMethodDescriptionbind
(String id, StateBinder binder) For internal use only; no backwards-compatibility guarantees.void
For internal use only; no backwards-compatibility guarantees.<ResultT> ResultT
match
(StateSpec.Cases<ResultT> cases) For internal use only; no backwards-compatibility guarantees.void
offerCoders
(Coder[] coders) For internal use only; no backwards-compatibility guarantees.
-
Method Details
-
bind
For internal use only; no backwards-compatibility guarantees.Use the
binder
to create an instance ofStateT
appropriate for this address. -
match
For internal use only; no backwards-compatibility guarantees.Perform case analysis on this
StateSpec
using the providedStateSpec.Cases
. -
offerCoders
For internal use only; no backwards-compatibility guarantees.Given {code coders} are inferred from type arguments defined for this class. Coders which are already set should take precedence over offered coders.
- Parameters:
coders
- Array of coders indexed by the type arguments order. Entries might be null if the coder could not be inferred.
-
finishSpecifying
For internal use only; no backwards-compatibility guarantees.Validates that this
StateSpec
has been specified correctly and finalizes it. Automatically invoked when the pipeline is built.
-