T - the type of the values being transcodedpublic abstract class StandardCoder<T> extends java.lang.Object implements Coder<T>
getComponents().Coder.Context| Modifier | Constructor and Description |
|---|---|
protected |
StandardCoder() |
| Modifier and Type | Method and Description |
|---|---|
com.google.cloud.dataflow.sdk.util.CloudObject |
asCloudObject()
Returns the
CloudObject that represents this Coder. |
boolean |
equals(java.lang.Object o) |
java.util.List<? extends Coder<?>> |
getComponents()
Returns the list of
Coders that are components of this
Coder. |
protected long |
getEncodedElementByteSize(T value,
Coder.Context context)
Returns the size in bytes of the encoded value using this
coder.
|
int |
hashCode() |
boolean |
isRegisterByteSizeObserverCheap(T value,
Coder.Context context)
StandardCoder requires elements to be fully encoded and copied
into a byte stream to determine the byte size of the element,
which is considered expensive.
|
void |
registerByteSizeObserver(T value,
com.google.cloud.dataflow.sdk.util.common.ElementByteSizeObserver observer,
Coder.Context context)
Notifies ElementByteSizeObserver about the byte size of the
encoded value using this coder.
|
java.lang.String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitdecode, encode, getCoderArguments, isDeterministicpublic java.util.List<? extends Coder<?>> getComponents()
Coders that are components of this
Coder. Returns an empty list if this is an AtomicCoder (or
other Coder with no components).public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic com.google.cloud.dataflow.sdk.util.CloudObject asCloudObject()
CoderCloudObject that represents this Coder.asCloudObject in interface Coder<T>public boolean isRegisterByteSizeObserverCheap(T value, Coder.Context context)
isRegisterByteSizeObserverCheap in interface Coder<T>protected long getEncodedElementByteSize(T value, Coder.Context context) throws java.lang.Exception
java.lang.Exceptionpublic void registerByteSizeObserver(T value, com.google.cloud.dataflow.sdk.util.common.ElementByteSizeObserver observer, Coder.Context context) throws java.lang.Exception
registerByteSizeObserver in interface Coder<T>java.lang.Exception