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()
NettyConnectionWriter
getNettyConnectionId
in interface NettyConnectionWriter
public void notifyAvailable()
NettyConnectionWriter
notifyAvailable
in interface NettyConnectionWriter
public int numQueuedPayloads()
NettyConnectionWriter
numQueuedPayloads
in interface NettyConnectionWriter
public int numQueuedBufferPayloads()
NettyConnectionWriter
numQueuedBufferPayloads
in interface NettyConnectionWriter
public void writeNettyPayload(NettyPayload nettyPayload)
NettyConnectionWriter
writeNettyPayload
in interface NettyConnectionWriter
nettyPayload
- the payload send to netty connection.public void close(@Nullable Throwable error)
NettyConnectionWriter
close
in interface NettyConnectionWriter
error
- error represents the exception information.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.