public interface IndexReaderHolder extends Closeable
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Release any resource currently held by the
IndexReaderHolder,
including (but not limiting to) the reader itself. |
IndexReader |
get() |
static IndexReaderHolder |
of(IndexReader indexReader) |
void close()
throws IOException
IndexReaderHolder,
including (but not limiting to) the reader itself.
After this method has been called, the result of calling any other method on the same instance is undefined.
close in interface AutoCloseableclose in interface CloseableIOException - If an error occurs while releasing resources.RuntimeException - If an error occurs while releasing resources.IndexReader get()
IndexReaderHolder.static IndexReaderHolder of(IndexReader indexReader)
indexReader - The IndexReader to hold.IndexReaderHolder that returns the given directory when get() is called
and simply closes the directory when close() is called.Copyright © 2006-2019 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.