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 interfaceCases 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.voidFor internal use only; no backwards-compatibility guarantees.<ResultT> ResultTmatch(StateSpec.Cases<ResultT> cases) For internal use only; no backwards-compatibility guarantees.voidofferCoders(Coder[] coders) For internal use only; no backwards-compatibility guarantees.
-
Method Details
-
bind
For internal use only; no backwards-compatibility guarantees.Use the
binderto create an instance ofStateTappropriate for this address. -
match
For internal use only; no backwards-compatibility guarantees.Perform case analysis on this
StateSpecusing 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
StateSpechas been specified correctly and finalizes it. Automatically invoked when the pipeline is built.
-