T - the type of elements handled by this coderpublic abstract class CustomCoder<T> extends AtomicCoder<T> implements Serializable
Coders that encodes itself via java
serialization. Subclasses only need to implement the Coder.encode(T, java.io.OutputStream, com.google.cloud.dataflow.sdk.coders.Coder.Context)
and Coder.decode(java.io.InputStream, com.google.cloud.dataflow.sdk.coders.Coder.Context) methods.
Not to be confused with SerializableCoder that encodes serializables.
Coder.Context, Coder.NonDeterministicException| Constructor and Description |
|---|
CustomCoder() |
| Modifier and Type | Method and Description |
|---|---|
com.google.cloud.dataflow.sdk.util.CloudObject |
asCloudObject()
Returns the
CloudObject that represents this Coder. |
static CustomCoder<?> |
of(String typeId,
String type,
String serializedCoder) |
void |
verifyDeterministic()
As a
DeterministicStandardCoder is presumed deterministic, this
method does nothing. |
getCoderArguments, getInstanceComponentsconsistentWithEquals, equals, getComponents, getEncodedElementByteSize, hashCode, isRegisterByteSizeObserverCheap, registerByteSizeObserver, structuralValue, toString, verifyDeterministic, verifyDeterministicpublic static CustomCoder<?> of(String typeId, String type, String serializedCoder)
public com.google.cloud.dataflow.sdk.util.CloudObject asCloudObject()
CoderCloudObject that represents this Coder.asCloudObject in interface Coder<T>asCloudObject in class StandardCoder<T>public void verifyDeterministic()
throws Coder.NonDeterministicException
DeterministicStandardCoderDeterministicStandardCoder is presumed deterministic, this
method does nothing.verifyDeterministic in interface Coder<T>verifyDeterministic in class DeterministicStandardCoder<T>Coder.NonDeterministicException - if this coder is not deterministic.