public static class MapTaskExecutorFactory.ElementByteSizeObservableCoder<T> extends Object implements ElementByteSizeObservable<T>
| Constructor and Description |
|---|
ElementByteSizeObservableCoder(Coder<T> coder) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isRegisterByteSizeObserverCheap(T value)
Returns whether
ElementByteSizeObservable.registerByteSizeObserver(T, com.google.cloud.dataflow.sdk.util.common.ElementByteSizeObserver) is cheap enough
to call for every element, that is, if this
ElementByteSizeObservable can calculate the byte size of
the element to be coded in roughly constant time (or lazily). |
void |
registerByteSizeObserver(T value,
ElementByteSizeObserver observer)
Notifies the
ElementByteSizeObserver about the byte size
of the encoded value using this ElementByteSizeObservable. |
public boolean isRegisterByteSizeObserverCheap(T value)
ElementByteSizeObservableElementByteSizeObservable.registerByteSizeObserver(T, com.google.cloud.dataflow.sdk.util.common.ElementByteSizeObserver) is cheap enough
to call for every element, that is, if this
ElementByteSizeObservable can calculate the byte size of
the element to be coded in roughly constant time (or lazily).isRegisterByteSizeObserverCheap in interface ElementByteSizeObservable<T>public void registerByteSizeObserver(T value, ElementByteSizeObserver observer) throws Exception
ElementByteSizeObservableElementByteSizeObserver about the byte size
of the encoded value using this ElementByteSizeObservable.registerByteSizeObserver in interface ElementByteSizeObservable<T>Exception