public class RemoteInputChannel extends InputChannel implements BufferRecycler, BufferListener
InputChannel.BufferAndAvailability
channelIndex, inputGate, numBytesIn, partitionId
Constructor and Description |
---|
RemoteInputChannel(SingleInputGate inputGate,
int channelIndex,
ResultPartitionID partitionId,
ConnectionID connectionId,
ConnectionManager connectionManager,
int initialBackOff,
int maxBackoff,
TaskIOMetricGroup metrics) |
RemoteInputChannel(SingleInputGate inputGate,
int channelIndex,
ResultPartitionID partitionId,
ConnectionID connectionId,
ConnectionManager connectionManager,
TaskIOMetricGroup metrics) |
Modifier and Type | Method and Description |
---|---|
BufferProvider |
getBufferProvider() |
int |
getInitialCredit() |
InputChannelID |
getInputChannelId() |
int |
getNumberOfAvailableBuffers() |
int |
getNumberOfQueuedBuffers() |
boolean |
notifyBufferAvailable(Buffer buffer)
The Buffer pool notifies this channel of an available floating buffer.
|
void |
notifyBufferDestroyed()
Notification callback if the buffer provider is destroyed.
|
void |
onBuffer(Buffer buffer,
int sequenceNumber) |
void |
onEmptyBuffer(int sequenceNumber) |
void |
onError(Throwable cause) |
void |
onFailedPartitionRequest() |
void |
recycle(MemorySegment segment)
Exclusive buffer is recycled to this input channel directly and it may trigger notify
credit to producer.
|
String |
toString() |
int |
unsynchronizedGetNumberOfQueuedBuffers() |
checkError, getCurrentBackoff, increaseBackoff, notifyChannelNonEmpty, setError
public RemoteInputChannel(SingleInputGate inputGate, int channelIndex, ResultPartitionID partitionId, ConnectionID connectionId, ConnectionManager connectionManager, TaskIOMetricGroup metrics)
public RemoteInputChannel(SingleInputGate inputGate, int channelIndex, ResultPartitionID partitionId, ConnectionID connectionId, ConnectionManager connectionManager, int initialBackOff, int maxBackoff, TaskIOMetricGroup metrics)
public void recycle(MemorySegment segment)
recycle
in interface BufferRecycler
segment
- The exclusive segment of this channel.public int getNumberOfAvailableBuffers()
public boolean notifyBufferAvailable(Buffer buffer)
notifyBufferAvailable
in interface BufferListener
buffer
- Buffer that becomes available in buffer pool.public void notifyBufferDestroyed()
BufferListener
notifyBufferDestroyed
in interface BufferListener
public int getNumberOfQueuedBuffers()
public int unsynchronizedGetNumberOfQueuedBuffers()
public InputChannelID getInputChannelId()
public int getInitialCredit()
public BufferProvider getBufferProvider() throws IOException
IOException
public void onBuffer(Buffer buffer, int sequenceNumber)
public void onEmptyBuffer(int sequenceNumber)
public void onFailedPartitionRequest()
public void onError(Throwable cause)
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.