/** * This is non-blocking operation. * @return current data * @throws NoSuchElementException if the current data is not available */ @Override Object fetchDataElement() throws NoSuchElementException, IOException { if (readable.isFinished()) { return Finishmark.getInstance(); } else { final long start = System.currentTimeMillis(); final Object element = retrieveElement(); boundedSourceReadTime += System.currentTimeMillis() - start; return element; } }
/** * This is non-blocking operation. * @return current data * @throws NoSuchElementException if the current data is not available */ @Override Object fetchDataElement() throws NoSuchElementException, IOException { if (readable.isFinished()) { return Finishmark.getInstance(); } else { final long start = System.currentTimeMillis(); final Object element = retrieveElement(); boundedSourceReadTime += System.currentTimeMillis() - start; return element; } }