@Override public void close() throws IOException { try { if( sourceCall != null ) scheme.sourceCleanup( flowProcess, sourceCall ); } finally { inputIterator.close(); } } }
private TupleEntry getNext() throws IOException { Tuples.asModifiable( sourceCall.getIncomingEntry().getTuple() ); hasWaiting = scheme.source( flowProcess, sourceCall ); while( !hasWaiting && inputIterator.hasNext() ) { sourceCall.setInput( wrapInput( inputIterator.next() ) ); try { scheme.sourceRePrepare( flowProcess, sourceCall ); } catch( IOException exception ) { throw new TupleException( "unable to prepare source for input identifier: " + loggableIdentifier.get(), exception ); } Tuples.asModifiable( sourceCall.getIncomingEntry().getTuple() ); hasWaiting = scheme.source( flowProcess, sourceCall ); } return getTupleEntry(); }