test_class.declarator: PAGE_SIZE = 512
test_class.modifier: private static final
test_class.original_string: private static final int PAGE_SIZE = 512;
test_class.type: int
test_class.var_name: PAGE_SIZE
test_class.file: flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/io/BarrierTrackerTest.java
test_class.identifier: BarrierTrackerTest
test_case.body: @Test
  	public void testSingleChannelNoBarriers() {
  		try {
  			BufferOrEvent[] sequence = { createBuffer(0), createBuffer(0), createBuffer(0) };
  
  			MockInputGate gate = new MockInputGate(PAGE_SIZE, 1, Arrays.asList(sequence));
  			BarrierTracker tracker = new BarrierTracker(gate);
  
  			for (BufferOrEvent boe : sequence) {
  				assertEquals(boe, tracker.getNextNonBlocked());
  			}
  			
  			assertNull(tracker.getNextNonBlocked());
  			assertNull(tracker.getNextNonBlocked());
  		}
  		catch (Exception e) {
  			e.printStackTrace();
  			fail(e.getMessage());
  		}
  	}
test_case.class_method_signature: BarrierTrackerTest.testSingleChannelNoBarriers()
test_case.full_signature: @Test public void testSingleChannelNoBarriers()
test_case.identifier: testSingleChannelNoBarriers
test_case.invocations: createBuffer createBuffer createBuffer asList assertEquals getNextNonBlocked assertNull getNextNonBlocked assertNull getNextNonBlocked printStackTrace fail getMessage
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSingleChannelNoBarriers()
focal_class.declarator: MAX_CHECKPOINTS_TO_TRACK = 50
focal_class.modifier: private static final
focal_class.original_string: private static final int MAX_CHECKPOINTS_TO_TRACK = 50;
focal_class.type: int
focal_class.var_name: MAX_CHECKPOINTS_TO_TRACK
focal_class.declarator: inputGate
focal_class.modifier: private final
focal_class.original_string: private final InputGate inputGate;
focal_class.type: InputGate
focal_class.var_name: inputGate
focal_class.declarator: totalNumberOfInputChannels
focal_class.modifier: private final
focal_class.original_string: private final int totalNumberOfInputChannels;
focal_class.type: int
focal_class.var_name: totalNumberOfInputChannels
focal_class.declarator: pendingCheckpoints
focal_class.modifier: private final
focal_class.original_string: private final ArrayDeque<CheckpointBarrierCount> pendingCheckpoints;
focal_class.type: ArrayDeque<CheckpointBarrierCount>
focal_class.var_name: pendingCheckpoints
focal_class.declarator: checkpointHandler
focal_class.modifier: private
focal_class.original_string: private EventListener<CheckpointBarrier> checkpointHandler;
focal_class.type: EventListener<CheckpointBarrier>
focal_class.var_name: checkpointHandler
focal_class.declarator: latestPendingCheckpointID = -1
focal_class.modifier: private
focal_class.original_string: private long latestPendingCheckpointID = -1;
focal_class.type: long
focal_class.var_name: latestPendingCheckpointID
focal_class.file: flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/BarrierTracker.java
focal_class.identifier: BarrierTracker
focal_class.interfaces: implements CheckpointBarrierHandler
focal_class.class_method_signature: BarrierTracker.BarrierTracker(InputGate inputGate)
focal_class.full_signature: public  BarrierTracker(InputGate inputGate)
focal_class.identifier: BarrierTracker
focal_class.modifiers: public
focal_class.parameters: (InputGate inputGate)
focal_class.signature:  BarrierTracker(InputGate inputGate)
focal_class.class_method_signature: BarrierTracker.getNextNonBlocked()
focal_class.full_signature: @Override public BufferOrEvent getNextNonBlocked()
focal_class.identifier: getNextNonBlocked
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: BufferOrEvent
focal_class.signature: BufferOrEvent getNextNonBlocked()
focal_class.class_method_signature: BarrierTracker.registerCheckpointEventHandler(EventListener<CheckpointBarrier> checkpointHandler)
focal_class.full_signature: @Override public void registerCheckpointEventHandler(EventListener<CheckpointBarrier> checkpointHandler)
focal_class.identifier: registerCheckpointEventHandler
focal_class.modifiers: @Override public
focal_class.parameters: (EventListener<CheckpointBarrier> checkpointHandler)
focal_class.return: void
focal_class.signature: void registerCheckpointEventHandler(EventListener<CheckpointBarrier> checkpointHandler)
focal_class.class_method_signature: BarrierTracker.cleanup()
focal_class.full_signature: @Override public void cleanup()
focal_class.identifier: cleanup
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void cleanup()
focal_class.class_method_signature: BarrierTracker.isEmpty()
focal_class.full_signature: @Override public boolean isEmpty()
focal_class.identifier: isEmpty
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isEmpty()
focal_class.class_method_signature: BarrierTracker.processBarrier(CheckpointBarrier receivedBarrier)
focal_class.full_signature: private void processBarrier(CheckpointBarrier receivedBarrier)
focal_class.identifier: processBarrier
focal_class.modifiers: private
focal_class.parameters: (CheckpointBarrier receivedBarrier)
focal_class.return: void
focal_class.signature: void processBarrier(CheckpointBarrier receivedBarrier)
focal_method.body: @Override
  	public BufferOrEvent getNextNonBlocked() throws IOException, InterruptedException {
  		while (true) {
  			BufferOrEvent next = inputGate.getNextBufferOrEvent();
  			if (next == null) {
  				return null;
  			}
  			else if (next.isBuffer() || next.getEvent().getClass() != CheckpointBarrier.class) {
  				return next;
  			}
  			else {
  				processBarrier((CheckpointBarrier) next.getEvent());
  			}
  		}
  	}
focal_method.class_method_signature: BarrierTracker.getNextNonBlocked()
focal_method.full_signature: @Override public BufferOrEvent getNextNonBlocked()
focal_method.identifier: getNextNonBlocked
focal_method.invocations: getNextBufferOrEvent isBuffer getClass getEvent processBarrier getEvent
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: BufferOrEvent
focal_method.signature: BufferOrEvent getNextNonBlocked()