public static class TimestampedValue.TimestampedValueCoder<T> extends StandardCoder<TimestampedValue<T>>
TimestampedValue.Coder.Context| 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()
Returns true if the coding is deterministic.
|
static <T> TimestampedValue.TimestampedValueCoder<T> |
of(Coder<T> valueCoder) |
static TimestampedValue.TimestampedValueCoder<?> |
of(java.util.List<java.lang.Object> components) |
asCloudObject, equals, getComponents, getEncodedElementByteSize, hashCode, isRegisterByteSizeObserverCheap, registerByteSizeObserver, toStringpublic 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 reasonpublic 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 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)