Class BufferedIoOutputStream

    • Field Detail

      • currentWrite

        protected final java.util.concurrent.atomic.AtomicReference<IoWriteFutureImpl> currentWrite
      • id

        protected final java.lang.Object id
    • Constructor Detail

      • BufferedIoOutputStream

        public BufferedIoOutputStream​(java.lang.Object id,
                                      IoOutputStream out)
    • Method Detail

      • getId

        public java.lang.Object getId()
      • writeBuffer

        public IoWriteFuture writeBuffer​(Buffer buffer)
                                  throws java.io.IOException
        Description copied from interface: IoOutputStream
        Write the given buffer.
        Specified by:
        writeBuffer in interface IoOutputStream
        Parameters:
        buffer - the data to write. NOTE: the buffer must not be touched until the returned write future is completed.
        Returns:
        An IoWriteFuture that can be used to check when the data has actually been written.
        Throws:
        java.io.IOException - if an error occurred when writing the data
      • startWriting

        protected void startWriting()
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object