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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface FrontendMessage
FrontendMessage.DirectEncoder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoiddispose()Release any resources (such as bound parameter buffers) held by this message without encoding it.Publisher<io.netty.buffer.ByteBuf> encode(io.netty.buffer.ByteBufAllocator byteBufAllocator) Encode a message into aByteBuf.booleaninthashCode()toString()Methods inherited from class io.netty.util.AbstractReferenceCounted
refCnt, release, release, retain, retain, setRefCnt, touch
-
Constructor Details
-
CopyData
public CopyData(io.netty.buffer.ByteBuf data) Create a new message.- Parameters:
data- data that forms part of aCOPYdata stream- Throws:
IllegalArgumentException- ifdataisnull
-
-
Method Details
-
encode
Description copied from interface:FrontendMessageEncode a message into aByteBuf.- Specified by:
encodein interfaceFrontendMessage- Parameters:
byteBufAllocator- the byteBufAllocator to use to get aByteBufto write into- Returns:
- a
Publisherthat produces theByteBufcontaining the encoded message
-
dispose
public void dispose()Description copied from interface:FrontendMessageRelease 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:
disposein interfaceFrontendMessage
-
equals
-
deallocate
protected void deallocate()- Specified by:
deallocatein classio.netty.util.AbstractReferenceCounted
-
touch
-
hashCode
-
toString
-