Class NettyPartitionRequestListener
- java.lang.Object
-
- org.apache.flink.runtime.io.network.netty.NettyPartitionRequestListener
-
- All Implemented Interfaces:
PartitionRequestListener
public class NettyPartitionRequestListener extends Object implements PartitionRequestListener
Implementation ofPartitionRequestListenerfor netty partition request.
-
-
Constructor Summary
Constructors Constructor Description NettyPartitionRequestListener(ResultPartitionProvider resultPartitionProvider, NetworkSequenceViewReader reader, ResultSubpartitionIndexSet subpartitionIndexSet, ResultPartitionID resultPartitionId)NettyPartitionRequestListener(ResultPartitionProvider resultPartitionProvider, NetworkSequenceViewReader reader, ResultSubpartitionIndexSet subpartitionIndexSet, ResultPartitionID resultPartitionId, long createTimestamp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetCreateTimestamp()The creation timestamp of this notifier, it's used to check whether the notifier is timeout.InputChannelIDgetReceiverId()Get the input channel id of the notifier.ResultPartitionIDgetResultPartitionId()Get the result partition id of the notifier.NetworkSequenceViewReadergetViewReader()Get the view reader of the notifier.voidnotifyPartitionCreated(ResultPartition partition)Notify the partition request listener when the given partition is registered.voidnotifyPartitionCreatedTimeout()When the partition request listener is timeout, it will be notified to sendPartitionNotFoundException.voidreleaseListener()Release this listener.
-
-
-
Constructor Detail
-
NettyPartitionRequestListener
public NettyPartitionRequestListener(ResultPartitionProvider resultPartitionProvider, NetworkSequenceViewReader reader, ResultSubpartitionIndexSet subpartitionIndexSet, ResultPartitionID resultPartitionId)
-
NettyPartitionRequestListener
@VisibleForTesting public NettyPartitionRequestListener(ResultPartitionProvider resultPartitionProvider, NetworkSequenceViewReader reader, ResultSubpartitionIndexSet subpartitionIndexSet, ResultPartitionID resultPartitionId, long createTimestamp)
-
-
Method Detail
-
getCreateTimestamp
public long getCreateTimestamp()
Description copied from interface:PartitionRequestListenerThe creation timestamp of this notifier, it's used to check whether the notifier is timeout.- Specified by:
getCreateTimestampin interfacePartitionRequestListener- Returns:
- the creation timestamp
-
getResultPartitionId
public ResultPartitionID getResultPartitionId()
Description copied from interface:PartitionRequestListenerGet the result partition id of the notifier.- Specified by:
getResultPartitionIdin interfacePartitionRequestListener- Returns:
- the result partition id
-
getViewReader
public NetworkSequenceViewReader getViewReader()
Description copied from interface:PartitionRequestListenerGet the view reader of the notifier.- Specified by:
getViewReaderin interfacePartitionRequestListener- Returns:
- the view reader
-
getReceiverId
public InputChannelID getReceiverId()
Description copied from interface:PartitionRequestListenerGet the input channel id of the notifier.- Specified by:
getReceiverIdin interfacePartitionRequestListener- Returns:
- the input channel id
-
notifyPartitionCreated
public void notifyPartitionCreated(ResultPartition partition) throws IOException
Description copied from interface:PartitionRequestListenerNotify the partition request listener when the given partition is registered.- Specified by:
notifyPartitionCreatedin interfacePartitionRequestListener- Parameters:
partition- The registered partition.- Throws:
IOException
-
notifyPartitionCreatedTimeout
public void notifyPartitionCreatedTimeout()
Description copied from interface:PartitionRequestListenerWhen the partition request listener is timeout, it will be notified to sendPartitionNotFoundException.- Specified by:
notifyPartitionCreatedTimeoutin interfacePartitionRequestListener
-
releaseListener
public void releaseListener()
Description copied from interface:PartitionRequestListenerRelease this listener.- Specified by:
releaseListenerin interfacePartitionRequestListener
-
-