Class CopyData

java.lang.Object
io.netty.util.AbstractReferenceCounted
io.r2dbc.postgresql.message.frontend.CopyData
All Implemented Interfaces:
io.netty.util.ReferenceCounted, FrontendMessage

public final class CopyData extends io.netty.util.AbstractReferenceCounted implements FrontendMessage
The CopyData message.
  • Constructor Details

    • CopyData

      public CopyData(io.netty.buffer.ByteBuf data)
      Create a new message.
      Parameters:
      data - data that forms part of a COPY data stream
      Throws:
      IllegalArgumentException - if data is null
  • Method Details

    • encode

      public Publisher<io.netty.buffer.ByteBuf> encode(io.netty.buffer.ByteBufAllocator byteBufAllocator)
      Description copied from interface: FrontendMessage
      Encode a message into a ByteBuf.
      Specified by:
      encode in interface FrontendMessage
      Parameters:
      byteBufAllocator - the byteBufAllocator to use to get a ByteBuf to write into
      Returns:
      a Publisher that produces the ByteBuf containing the encoded message
    • dispose

      public void dispose()
      Description copied from interface: FrontendMessage
      Release any resources (such as bound parameter buffers) held by this message without encoding it. Invoked when a message is discarded before reaching the wire, e.g. when the connection is closed or the conversation is cancelled while the message is still queued. The default implementation does nothing. Implementations that own reference-counted buffers must release them here and must be idempotent so that disposal is safe regardless of whether the message was already encoded.
      Specified by:
      dispose in interface FrontendMessage
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • deallocate

      protected void deallocate()
      Specified by:
      deallocate in class io.netty.util.AbstractReferenceCounted
    • touch

      public CopyData touch(Object hint)
      Specified by:
      touch in interface io.netty.util.ReferenceCounted
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object