@Override public synchronized void flush() throws IOException { if (lastWriteFuture == null) { return; } lastWriteFuture.join(); if (!lastWriteFuture.isWritten()) { throw new IOException( "The bytes could not be written to the session"); } } }
@Override public synchronized void flush() throws IOException { m_log.debug("Flushing IoSession output stream..."); if (m_lastWriteFuture == null) { return; } m_lastWriteFuture.join(); if (!m_lastWriteFuture.isWritten()) { throw new IOException( "The bytes could not be written to the session"); } } }
protected synchronized void write(final T message) throws IOException { m_log.debug("Writing message: {}", message); checkClosed(); m_lastWriteFuture = m_ioSession.write(message); m_lastWriteFuture.join(m_ioSession.getWriteTimeoutInMillis()); m_log.debug("Finshing writing message..."); }