class IndexWriter.ReaderPool
extends java.lang.Object
implements java.io.Closeable
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<SegmentCommitInfo,ReadersAndUpdates> |
readerMap |
| Constructor and Description |
|---|
ReaderPool() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
anyPendingDeletes() |
void |
close() |
void |
commit(SegmentInfos infos)
Commit live docs changes for the segment readers for
the provided infos.
|
void |
drop(SegmentCommitInfo info) |
(package private) void |
dropAll(boolean doSave)
Remove all our references to readers, and commits
any pending changes.
|
ReadersAndUpdates |
get(SegmentCommitInfo info,
boolean create)
Obtain a ReadersAndLiveDocs instance from the
readerPool.
|
boolean |
infoIsLive(SegmentCommitInfo info) |
private boolean |
noDups() |
void |
release(ReadersAndUpdates rld) |
void |
release(ReadersAndUpdates rld,
boolean assertInfoLive) |
private final java.util.Map<SegmentCommitInfo,ReadersAndUpdates> readerMap
public boolean infoIsLive(SegmentCommitInfo info)
public void drop(SegmentCommitInfo info) throws java.io.IOException
java.io.IOExceptionpublic boolean anyPendingDeletes()
public void release(ReadersAndUpdates rld) throws java.io.IOException
java.io.IOExceptionpublic void release(ReadersAndUpdates rld, boolean assertInfoLive) throws java.io.IOException
java.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionvoid dropAll(boolean doSave)
throws java.io.IOException
java.io.IOExceptionpublic void commit(SegmentInfos infos) throws java.io.IOException
java.io.IOException - If there is a low-level I/O errorpublic ReadersAndUpdates get(SegmentCommitInfo info, boolean create)
release(ReadersAndUpdates).private boolean noDups()