public class NettyConnectionWriterImpl extends Object implements NettyConnectionWriter
NettyConnectionWriter.| Constructor and Description |
|---|
NettyConnectionWriterImpl(NettyPayloadManager nettyPayloadManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
close(Throwable error)
If error is null, remove and recycle all buffers in the writer.
|
NettyConnectionId |
getNettyConnectionId()
Get the id of connection in the writer.
|
void |
notifyAvailable()
Notify the buffer is available in writer.
|
int |
numQueuedBufferPayloads()
Get the number of written but unsent buffer netty payloads.
|
int |
numQueuedPayloads()
Get the number of written but unsent netty payloads.
|
void |
registerAvailabilityListener(Runnable availabilityListener) |
void |
writeNettyPayload(NettyPayload nettyPayload)
Write a buffer to netty connection.
|
public NettyConnectionWriterImpl(NettyPayloadManager nettyPayloadManager)
public void registerAvailabilityListener(Runnable availabilityListener)
public NettyConnectionId getNettyConnectionId()
NettyConnectionWritergetNettyConnectionId in interface NettyConnectionWriterpublic void notifyAvailable()
NettyConnectionWriternotifyAvailable in interface NettyConnectionWriterpublic int numQueuedPayloads()
NettyConnectionWriternumQueuedPayloads in interface NettyConnectionWriterpublic int numQueuedBufferPayloads()
NettyConnectionWriternumQueuedBufferPayloads in interface NettyConnectionWriterpublic void writeNettyPayload(NettyPayload nettyPayload)
NettyConnectionWriterwriteNettyPayload in interface NettyConnectionWriternettyPayload - the payload send to netty connection.public void close(@Nullable Throwable error)
NettyConnectionWriterclose in interface NettyConnectionWritererror - error represents the exception information.Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.