Package it.unimi.di.big.mg4j.document
Class JdbcDocumentCollection.JdbcDocumentIterator
- java.lang.Object
-
- it.unimi.di.big.mg4j.document.AbstractDocumentIterator
-
- it.unimi.di.big.mg4j.document.JdbcDocumentCollection.JdbcDocumentIterator
-
- All Implemented Interfaces:
DocumentIterator,SafelyCloseable,Closeable,AutoCloseable
- Enclosing class:
- JdbcDocumentCollection
protected class JdbcDocumentCollection.JdbcDocumentIterator extends AbstractDocumentIterator
An iterator over the whole collection that performs a single DBMS transaction.
-
-
Method Summary
Modifier and Type Method Description voidclose()Closes this document iterator, releasing all resources.DocumentnextDocument()Returns the next document.-
Methods inherited from class it.unimi.di.big.mg4j.document.AbstractDocumentIterator
finalize
-
-
-
-
Method Detail
-
nextDocument
public Document nextDocument() throws IOException
Description copied from interface:DocumentIteratorReturns the next document.- Returns:
- the next document, or
nullif there are no other documents. - Throws:
IOException
-
close
public void close() throws IOExceptionDescription copied from interface:DocumentIteratorCloses this document iterator, releasing all resources.You should always call this method after having finished with this iterator. Implementations are invited to call this method in a finaliser as a safety net, but since there is no guarantee as to when finalisers are invoked, you should not depend on this behaviour.
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceDocumentIterator- Overrides:
closein classAbstractDocumentIterator- Throws:
IOException
-
-