test_class.file: concurrentli/src/test/java/com/concurrentli/ParallelProcessorTest.java
test_class.identifier: ParallelProcessorTest
test_case.body: @Test
    public void skipTest() throws InterruptedException {
      DummyProcessor dp = new DummyProcessor(false);
  
      for (int i = 0; i < 10000; i += 5) {
        Integer res = dp.nextInterruptable();
        assertEquals(i, (int) res);
        dp.skip(4);
      }
    }
test_case.class_method_signature: ParallelProcessorTest.skipTest()
test_case.full_signature: @Test public void skipTest()
test_case.identifier: skipTest
test_case.invocations: nextInterruptable assertEquals skip
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void skipTest()
focal_class.declarator: _inputQueue
focal_class.modifier: private final
focal_class.original_string: private final ArrayBlockingQueue<InputResultBatch<T, R>> _inputQueue;
focal_class.type: ArrayBlockingQueue<InputResultBatch<T, R>>
focal_class.var_name: _inputQueue
focal_class.declarator: _resultQueue
focal_class.modifier: private final
focal_class.original_string: private final SequentialQueue<InputResultBatch<T, R>> _resultQueue;
focal_class.type: SequentialQueue<InputResultBatch<T, R>>
focal_class.var_name: _resultQueue
focal_class.declarator: _currentResult = null
focal_class.modifier: private
focal_class.original_string: private InputResultBatch<T, R> _currentResult = null;
focal_class.type: InputResultBatch<T, R>
focal_class.var_name: _currentResult
focal_class.declarator: _currentResultIndex = 0
focal_class.modifier: private
focal_class.original_string: private int _currentResultIndex = 0;
focal_class.type: int
focal_class.var_name: _currentResultIndex
focal_class.declarator: _readerThread
focal_class.modifier: private final
focal_class.original_string: private final Thread _readerThread;
focal_class.type: Thread
focal_class.var_name: _readerThread
focal_class.declarator: _processorThreads
focal_class.modifier: private final
focal_class.original_string: private final Thread[] _processorThreads;
focal_class.type: Thread[]
focal_class.var_name: _processorThreads
focal_class.declarator: _nextInputException = null
focal_class.modifier: private
focal_class.original_string: private NextInputException _nextInputException = null;
focal_class.type: NextInputException
focal_class.var_name: _nextInputException
focal_class.declarator: _started = false
focal_class.modifier: private
focal_class.original_string: private boolean _started = false;
focal_class.type: boolean
focal_class.var_name: _started
focal_class.declarator: _endOfResults = false
focal_class.modifier: private
focal_class.original_string: private boolean _endOfResults = false;
focal_class.type: boolean
focal_class.var_name: _endOfResults
focal_class.declarator: _batchPool
focal_class.modifier: private final
focal_class.original_string: private final InputResultBatch<T, R>[] _batchPool;
focal_class.type: InputResultBatch<T, R>[]
focal_class.var_name: _batchPool
focal_class.file: concurrentli/src/main/java/com/concurrentli/ParallelProcessor.java
focal_class.identifier: ParallelProcessor
focal_class.interfaces: implements AutoCloseable, BatchIterator<R>
focal_class.class_method_signature: ParallelProcessor.nextInput()
focal_class.full_signature: protected abstract T nextInput()
focal_class.identifier: nextInput
focal_class.modifiers: protected abstract
focal_class.parameters: ()
focal_class.return: T
focal_class.signature: T nextInput()
focal_class.class_method_signature: ParallelProcessor.readInputs(T[] inputs)
focal_class.full_signature: protected int readInputs(T[] inputs)
focal_class.identifier: readInputs
focal_class.modifiers: protected
focal_class.parameters: (T[] inputs)
focal_class.return: int
focal_class.signature: int readInputs(T[] inputs)
focal_class.class_method_signature: ParallelProcessor.processInput(T input)
focal_class.full_signature: protected abstract R processInput(T input)
focal_class.identifier: processInput
focal_class.modifiers: protected abstract
focal_class.parameters: (T input)
focal_class.return: R
focal_class.signature: R processInput(T input)
focal_class.class_method_signature: ParallelProcessor.processInputsUnsafe(int length, Object[] data)
focal_class.full_signature: protected void processInputsUnsafe(int length, Object[] data)
focal_class.identifier: processInputsUnsafe
focal_class.modifiers: protected
focal_class.parameters: (int length, Object[] data)
focal_class.return: void
focal_class.signature: void processInputsUnsafe(int length, Object[] data)
focal_class.class_method_signature: ParallelProcessor.ParallelProcessor(Config config)
focal_class.full_signature: public  ParallelProcessor(Config config)
focal_class.identifier: ParallelProcessor
focal_class.modifiers: public
focal_class.parameters: (Config config)
focal_class.signature:  ParallelProcessor(Config config)
focal_class.class_method_signature: ParallelProcessor.ParallelProcessor(int readerThreadPriority, int processorThreads, int processorThreadPriority,
        int batchSize, int inputBufferSize, int outputBufferSize)
focal_class.full_signature: private  ParallelProcessor(int readerThreadPriority, int processorThreads, int processorThreadPriority,
        int batchSize, int inputBufferSize, int outputBufferSize)
focal_class.identifier: ParallelProcessor
focal_class.modifiers: private
focal_class.parameters: (int readerThreadPriority, int processorThreads, int processorThreadPriority,
        int batchSize, int inputBufferSize, int outputBufferSize)
focal_class.signature:  ParallelProcessor(int readerThreadPriority, int processorThreads, int processorThreadPriority,
        int batchSize, int inputBufferSize, int outputBufferSize)
focal_class.class_method_signature: ParallelProcessor.ensureBuffer()
focal_class.full_signature: private boolean ensureBuffer()
focal_class.identifier: ensureBuffer
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean ensureBuffer()
focal_class.class_method_signature: ParallelProcessor.nextInterruptable()
focal_class.full_signature: public R nextInterruptable()
focal_class.identifier: nextInterruptable
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: R
focal_class.signature: R nextInterruptable()
focal_class.class_method_signature: ParallelProcessor.hasNext()
focal_class.full_signature: @Override public boolean hasNext()
focal_class.identifier: hasNext
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean hasNext()
focal_class.class_method_signature: ParallelProcessor.next()
focal_class.full_signature: @Override public R next()
focal_class.identifier: next
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: R
focal_class.signature: R next()
focal_class.class_method_signature: ParallelProcessor.next(R[] destination, int offset, int count)
focal_class.full_signature: @Override public int next(R[] destination, int offset, int count)
focal_class.identifier: next
focal_class.modifiers: @Override public
focal_class.parameters: (R[] destination, int offset, int count)
focal_class.return: int
focal_class.signature: int next(R[] destination, int offset, int count)
focal_class.class_method_signature: ParallelProcessor.skip(long count)
focal_class.full_signature: @Override public long skip(long count)
focal_class.identifier: skip
focal_class.modifiers: @Override public
focal_class.parameters: (long count)
focal_class.return: long
focal_class.signature: long skip(long count)
focal_class.class_method_signature: ParallelProcessor.getBlockingStatus()
focal_class.full_signature: public BlockingStatus getBlockingStatus()
focal_class.identifier: getBlockingStatus
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: BlockingStatus
focal_class.signature: BlockingStatus getBlockingStatus()
focal_class.class_method_signature: ParallelProcessor.available()
focal_class.full_signature: @Override public long available()
focal_class.identifier: available
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long available()
focal_class.class_method_signature: ParallelProcessor.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: ParallelProcessor.start()
focal_class.full_signature: public void start()
focal_class.identifier: start
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void start()
focal_class.class_method_signature: ParallelProcessor.stopNow()
focal_class.full_signature: private void stopNow()
focal_class.identifier: stopNow
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void stopNow()
focal_class.class_method_signature: ParallelProcessor.enqueueException(long index, RuntimeException e)
focal_class.full_signature: private void enqueueException(long index, RuntimeException e)
focal_class.identifier: enqueueException
focal_class.modifiers: private
focal_class.parameters: (long index, RuntimeException e)
focal_class.return: void
focal_class.signature: void enqueueException(long index, RuntimeException e)
focal_class.class_method_signature: ParallelProcessor.enqueueInputTerminators(long index)
focal_class.full_signature: private void enqueueInputTerminators(long index)
focal_class.identifier: enqueueInputTerminators
focal_class.modifiers: private
focal_class.parameters: (long index)
focal_class.return: void
focal_class.signature: void enqueueInputTerminators(long index)
focal_class.class_method_signature: ParallelProcessor.readerThread()
focal_class.full_signature: private void readerThread()
focal_class.identifier: readerThread
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void readerThread()
focal_class.class_method_signature: ParallelProcessor.processorThread()
focal_class.full_signature: private void processorThread()
focal_class.identifier: processorThread
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void processorThread()
focal_method.body: @Override
    public long skip(long count) {
      long skipped = 0;
      while (skipped < count) {
        try {
          if (!ensureBuffer()) {
            return skipped; // end of results
          }
        } catch (InterruptedException e) {
          Thread.currentThread().interrupt();
          throw new UncheckedInterruptedException(e);
        }
  
        int toSkip = (int) Math.min(count - skipped, _currentResult._length - _currentResultIndex);
        Arrays.fill(_currentResult._data, _currentResultIndex, _currentResultIndex + toSkip, null);
  
        _currentResultIndex += toSkip;
        skipped += toSkip;
      }
  
      assert skipped == count;
      return skipped;
    }
focal_method.class_method_signature: ParallelProcessor.skip(long count)
focal_method.full_signature: @Override public long skip(long count)
focal_method.identifier: skip
focal_method.invocations: ensureBuffer interrupt currentThread min fill
focal_method.modifiers: @Override public
focal_method.parameters: (long count)
focal_method.return: long
focal_method.signature: long skip(long count)