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 IoOutputStream |
out |
protected Queue<IoWriteFutureImpl> |
writes |
closeFuture, lock, statelogCLOSE_WAIT_TIMEOUT, DEFAULT_CLOSE_WAIT_TIMEOUT| Constructor and Description |
|---|
BufferedIoOutputStream(IoOutputStream out) |
| Modifier and Type | Method and Description |
|---|---|
protected Closeable |
getInnerCloseable() |
protected void |
startWriting() |
String |
toString() |
IoWriteFuture |
write(Buffer buffer)
NOTE: the buffer must not be touched until the returned write future is completed.
|
doCloseGracefully, doCloseImmediatelyaddCloseFutureListener, builder, close, isClosed, isClosing, preClose, removeCloseFutureListenergetSimplifiedLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddCloseFutureListener, close, close, close, getMaxCloseWaitTime, isClosed, isClosing, isOpen, removeCloseFutureListenerprotected final IoOutputStream out
protected final Queue<IoWriteFutureImpl> writes
protected final AtomicReference<IoWriteFutureImpl> currentWrite
public BufferedIoOutputStream(IoOutputStream out)
public IoWriteFuture write(Buffer buffer)
IoOutputStreamwrite in interface IoOutputStreambuffer - the Buffer to useIoWriteFuture for the operationprotected void startWriting()
protected Closeable getInnerCloseable()
getInnerCloseable in class AbstractInnerCloseableCopyright © 2008–2017 The Apache Software Foundation. All rights reserved.