public class BeamFnDataSizeBasedBufferingOutboundObserver<T> extends java.lang.Object implements BeamFnDataBufferingOutboundObserver<T>
FnDataReceiver
for the Beam Fn Data API.
TODO: Handle outputting large elements (> 2GiBs). Note that this also applies to the input side as well.
TODO: Handle outputting elements that are zero bytes by outputting a single byte as a marker, detect on the input side that no bytes were read and force reading a single byte.
BEAM_FN_API_DATA_BUFFER_LIMIT, BEAM_FN_API_DATA_BUFFER_SIZE_LIMIT, BEAM_FN_API_DATA_BUFFER_TIME_LIMIT, DATA_BUFFER_SIZE_LIMIT, DATA_BUFFER_TIME_LIMIT_MS, DEFAULT_BUFFER_LIMIT_BYTES, DEFAULT_BUFFER_LIMIT_TIME_MS
Modifier and Type | Method and Description |
---|---|
void |
accept(T t) |
void |
close()
.
|
void |
flush()
Eagerly flushes any data that is buffered in this channel.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forLocation, getSizeLimit, getTimeLimit
public void close() throws java.lang.Exception
CloseableFnDataReceiver
Does nothing if this CloseableFnDataReceiver
is already closed.
close
in interface java.lang.AutoCloseable
close
in interface CloseableFnDataReceiver<T>
java.lang.Exception
public void flush() throws java.io.IOException
CloseableFnDataReceiver
flush
in interface CloseableFnDataReceiver<T>
java.io.IOException
public void accept(T t) throws java.io.IOException
accept
in interface FnDataReceiver<T>
java.io.IOException