T - the type of the values associated with this tagpublic class CodedTupleTag<T> extends TupleTag<T>
TupleTag combined with the Coder to use for
values associated with the tag.
Used as tags in
DoFn.KeyedState.
| Modifier and Type | Method and Description |
|---|---|
Coder<T> |
getCoder()
Returns the
Coder used for values associated with this tag. |
static <T> CodedTupleTag<T> |
of(java.lang.String id,
Coder<T> coder)
Returns a
CodedTupleTag with the given id which uses the
given Coder whenever a value associated with the tag
needs to be serialized. |
java.lang.String |
toString() |
asCloudObject, equals, getId, getOutName, getTypeToken, hashCodepublic static <T> CodedTupleTag<T> of(java.lang.String id, Coder<T> coder)
CodedTupleTag with the given id which uses the
given Coder whenever a value associated with the tag
needs to be serialized.
It is up to the user to ensure that two
CodedTupleTags with the same id actually mean the same
tag and carry the same generic type parameter. Violating this
invariant can lead to hard-to-diagnose runtime type errors.
(An explicit id is required so that persistent keyed state saved by one run of a streaming program can be reused if that streaming program is upgraded to a new version.)
T - the type of the values associated with the tag