Class NettyConnectionWriterImpl
java.lang.Object
org.apache.flink.runtime.io.network.partition.hybrid.tiered.netty.NettyConnectionWriterImpl
- All Implemented Interfaces:
NettyConnectionWriter
The default implementation of
NettyConnectionWriter.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidIf error is null, remove and recycle all buffers in the writer.Get the id of connection in the writer.voidNotify the buffer is available in writer.intGet the number of written but unsent buffer netty payloads.intGet the number of written but unsent netty payloads.voidregisterAvailabilityListener(Runnable availabilityListener) voidwriteNettyPayload(NettyPayload nettyPayload) Write a buffer to netty connection.
-
Constructor Details
-
NettyConnectionWriterImpl
-
-
Method Details
-
registerAvailabilityListener
-
getNettyConnectionId
Description copied from interface:NettyConnectionWriterGet the id of connection in the writer.- Specified by:
getNettyConnectionIdin interfaceNettyConnectionWriter- Returns:
- the id of connection.
-
notifyAvailable
public void notifyAvailable()Description copied from interface:NettyConnectionWriterNotify the buffer is available in writer.- Specified by:
notifyAvailablein interfaceNettyConnectionWriter
-
numQueuedPayloads
public int numQueuedPayloads()Description copied from interface:NettyConnectionWriterGet the number of written but unsent netty payloads.- Specified by:
numQueuedPayloadsin interfaceNettyConnectionWriter- Returns:
- the buffer number.
-
numQueuedBufferPayloads
public int numQueuedBufferPayloads()Description copied from interface:NettyConnectionWriterGet the number of written but unsent buffer netty payloads.- Specified by:
numQueuedBufferPayloadsin interfaceNettyConnectionWriter- Returns:
- the buffer number.
-
writeNettyPayload
Description copied from interface:NettyConnectionWriterWrite a buffer to netty connection.- Specified by:
writeNettyPayloadin interfaceNettyConnectionWriter- Parameters:
nettyPayload- the payload send to netty connection.
-
close
Description copied from interface:NettyConnectionWriterIf 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.- Specified by:
closein interfaceNettyConnectionWriter- Parameters:
error- error represents the exception information.
-