public class BufferedIoOutputStream extends AbstractInnerCloseable implements IoOutputStream
IoOutputStream capable of queuing write requestsAbstractCloseable.State| Modifier and Type | Field and Description |
|---|---|
protected AtomicReference<IoWriteFutureImpl> |
currentWrite |
protected Object |
id |
protected IoOutputStream |
out |
protected Queue<IoWriteFutureImpl> |
writes |
closeFuture, futureLock, statelogCLOSE_WAIT_TIMEOUT, DEFAULT_CLOSE_WAIT_TIMEOUT| Constructor and Description |
|---|
BufferedIoOutputStream(Object id,
IoOutputStream out) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getId() |
protected Closeable |
getInnerCloseable() |
protected void |
startWriting() |
String |
toString() |
IoWriteFuture |
writePacket(Buffer buffer) |
doCloseGracefully, doCloseImmediatelyaddCloseFutureListener, builder, close, getFutureLock, isClosed, isClosing, preClose, removeCloseFutureListenergetSimplifiedLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddCloseFutureListener, close, close, close, getMaxCloseWaitTime, isClosed, isClosing, isOpen, removeCloseFutureListenercalculatePadLengthprotected final IoOutputStream out
protected final Queue<IoWriteFutureImpl> writes
protected final AtomicReference<IoWriteFutureImpl> currentWrite
protected final Object id
public BufferedIoOutputStream(Object id, IoOutputStream out)
public Object getId()
public IoWriteFuture writePacket(Buffer buffer) throws IOException
writePacket in interface PacketWriterIOExceptionprotected void startWriting()
throws IOException
IOExceptionprotected Closeable getInnerCloseable()
getInnerCloseable in class AbstractInnerCloseableCopyright © 2008–2020 The Apache Software Foundation. All rights reserved.