public class LazyDocumentSource extends Object implements DocumentSource
DocumentSource that is lazy loaded. Using this as a wrapper around
another source may save resources, since a DocumentSource is not
always invoked and thus the initial creation and closing of the source can
sometimes be avoided.| Constructor and Description |
|---|
LazyDocumentSource(LazyRef<DocumentSource> lazyRef) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Document |
next()
Gets the next sample from the source, or returns null if there are no
more documents available.
|
public LazyDocumentSource(LazyRef<DocumentSource> lazyRef)
public Document next()
DocumentSourcenext in interface DocumentSourcepublic void close()
close in interface Closeableclose in interface AutoCloseableclose in interface DocumentSourceCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.