public class BarrierBuffer extends Object
| Constructor and Description |
|---|
BarrierBuffer(org.apache.flink.runtime.io.network.partition.consumer.InputGate inputGate,
org.apache.flink.runtime.io.network.api.reader.AbstractReader reader) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
actOnAllBlocked()
Method that is executed once the barrier has been received from all
channels.
|
protected void |
blockChannel(int channelIndex)
Blocks the given channel index, from which a barrier has been received.
|
void |
cleanup() |
org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent |
getNextNonBlocked()
Returns the next non-blocked BufferOrEvent.
|
protected org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent |
getNonProcessed()
Get then next non-blocked non-processed BufferOrEvent.
|
protected boolean |
isAllBlocked()
Checks whether all channels are blocked meaning that barriers are
received from all channels
|
protected boolean |
isBlocked(int channelIndex)
Checks whether a given channel index is blocked for this inputgate
|
boolean |
isEmpty() |
void |
processSuperstep(org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent bufferOrEvent)
Processes a streaming superstep event
|
protected void |
releaseBlocks()
Releases the blocks on all channels.
|
protected void |
startSuperstep(StreamingSuperstep superstep)
Starts the next superstep in the buffer
|
String |
toString() |
public BarrierBuffer(org.apache.flink.runtime.io.network.partition.consumer.InputGate inputGate,
org.apache.flink.runtime.io.network.api.reader.AbstractReader reader)
protected void startSuperstep(StreamingSuperstep superstep)
superstep - The next superstepprotected org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent getNonProcessed()
throws IOException
IOExceptionprotected boolean isBlocked(int channelIndex)
channelIndex - The channel index to checkprotected boolean isAllBlocked()
public org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent getNextNonBlocked()
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionprotected void blockChannel(int channelIndex)
channelIndex - The channel index to block.protected void releaseBlocks()
IOExceptionprotected void actOnAllBlocked()
public void processSuperstep(org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent bufferOrEvent)
bufferOrEvent - The BufferOrEvent containing the eventpublic void cleanup()
throws IOException
IOExceptionpublic boolean isEmpty()
Copyright © 2014–2015 The Apache Software Foundation. All rights reserved.