public static class TimestampedValue.TimestampedValueCoder<T> extends StandardCoder<TimestampedValue<T>>
TimestampedValue.Coder.Context, Coder.NonDeterministicException| Modifier and Type | Method and Description |
|---|---|
TimestampedValue<T> |
decode(java.io.InputStream inStream,
Coder.Context context)
Decodes a value of type
T from the given input stream in
the given context. |
void |
encode(TimestampedValue<T> windowedElem,
java.io.OutputStream outStream,
Coder.Context context)
Encodes the given value of type
T onto the given output stream
in the given context. |
java.util.List<? extends Coder<?>> |
getCoderArguments()
If this is a
Coder for a parameterized type, returns the
list of Coders being used for each of the parameters, or
returns null if this cannot be done or this is not a
parameterized type. |
static <T> java.util.List<java.lang.Object> |
getInstanceComponents(TimestampedValue<T> exampleValue) |
boolean |
isDeterministic()
Deprecated.
|
static <T> TimestampedValue.TimestampedValueCoder<T> |
of(Coder<T> valueCoder) |
static TimestampedValue.TimestampedValueCoder<?> |
of(java.util.List<java.lang.Object> components) |
void |
verifyDeterministic()
Throw
Coder.NonDeterministicException if the coding is not deterministic. |
asCloudObject, consistentWithEquals, equals, getComponents, getEncodedElementByteSize, hashCode, isRegisterByteSizeObserverCheap, registerByteSizeObserver, structuralValue, toString, verifyDeterministic, verifyDeterministicpublic static <T> TimestampedValue.TimestampedValueCoder<T> of(Coder<T> valueCoder)
public static TimestampedValue.TimestampedValueCoder<?> of(java.util.List<java.lang.Object> components)
public void encode(TimestampedValue<T> windowedElem, java.io.OutputStream outStream, Coder.Context context) throws java.io.IOException
CoderT onto the given output stream
in the given context.java.io.IOException - if writing to the OutputStream fails
for some reasonCoderException - if the value could not be encoded for some reasonpublic TimestampedValue<T> decode(java.io.InputStream inStream, Coder.Context context) throws java.io.IOException
CoderT from the given input stream in
the given context. Returns the decoded value.java.io.IOException - if reading from the InputStream fails
for some reasonCoderException - if the value could not be decoded for some reason@Deprecated public boolean isDeterministic()
Coder In order for a Coder to be considered deterministic,
the following must be true:
Object.equals()
or Comparable.compareTo(), if supported) have the same
encoding.
Coder always produces a canonical encoding, which is the
same for an instance of an object even if produced on different
computers at different times.
public void verifyDeterministic()
throws Coder.NonDeterministicException
CoderCoder.NonDeterministicException if the coding is not deterministic.
In order for a Coder to be considered deterministic,
the following must be true:
Object.equals()
or Comparable.compareTo(), if supported) have the same
encoding.
Coder always produces a canonical encoding, which is the
same for an instance of an object even if produced on different
computers at different times.
verifyDeterministic in interface Coder<TimestampedValue<T>>verifyDeterministic in class StandardCoder<TimestampedValue<T>>Coder.NonDeterministicException - if this coder is not deterministic.public java.util.List<? extends Coder<?>> getCoderArguments()
CoderCoder for a parameterized type, returns the
list of Coders being used for each of the parameters, or
returns null if this cannot be done or this is not a
parameterized type.public static <T> java.util.List<java.lang.Object> getInstanceComponents(TimestampedValue<T> exampleValue)