All Known Implementing Classes:
NettyConnectionWriterImpl

public interface NettyConnectionWriter
NettyConnectionWriter is used by TierProducerAgent to write buffers to netty connection. Buffers in the writer will be written to a queue structure and netty server will send buffers from it.
  • Method Details

    • writeNettyPayload

      void writeNettyPayload(NettyPayload nettyPayload)
      Write a buffer to netty connection.
      Parameters:
      nettyPayload - the payload send to netty connection.
    • getNettyConnectionId

      NettyConnectionId getNettyConnectionId()
      Get the id of connection in the writer.
      Returns:
      the id of connection.
    • notifyAvailable

      void notifyAvailable()
      Notify the buffer is available in writer.
    • numQueuedPayloads

      int numQueuedPayloads()
      Get the number of written but unsent netty payloads.
      Returns:
      the buffer number.
    • numQueuedBufferPayloads

      int numQueuedBufferPayloads()
      Get the number of written but unsent buffer netty payloads.
      Returns:
      the buffer number.
    • close

      void close(@Nullable Throwable error)
      If error is null, remove and recycle all buffers in the writer. If error is not null, the error will be written after all buffers are removed and recycled.
      Parameters:
      error - error represents the exception information.