//@Override public override void close() { base.close(); try { _document_source.close(); } catch (Exception e) { logger.warn("Failed to close DocumentSource: {}", _document, e); } } // close()
} // offerSources() protected void offerDocumentSource(DocumentSource documentSource) { try { while (true) { Document document = documentSource.next(); if (document == null) { break; } String tableName = determineTable(document); addObservation(tableName, document); } } finally { documentSource.close(); } } // offerDocumentSource()
} // constructor // @Override public void offerSources(DocumentSourceProvider documentSourceProvider) { DocumentSource document_source = documentSourceProvider.getMixedDocumentSourceForSampling(); try { while (true) { Document document = document_source.next(); if (document == null) { break; } string tableName = determineTable(document); addObservation(tableName, document); } } finally { document_source.close(); } } // offerSources()
} // next() // @Override public void close() { _delegate.close(); } // close()