class ReadersAndUpdates
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
SegmentCommitInfo |
info |
private boolean |
isMerging |
private Bits |
liveDocs |
private boolean |
liveDocsShared |
private java.util.Map<java.lang.String,java.util.List<DocValuesFieldUpdates>> |
mergingDVUpdates |
private int |
pendingDeleteCount |
private java.util.Map<java.lang.String,java.util.List<DocValuesFieldUpdates>> |
pendingDVUpdates |
java.util.concurrent.atomic.AtomicLong |
ramBytesUsed |
private SegmentReader |
reader |
private java.util.concurrent.atomic.AtomicInteger |
refCount |
(package private) Sorter.DocMap |
sortMap |
private IndexWriter |
writer |
| Constructor and Description |
|---|
ReadersAndUpdates(IndexWriter writer,
SegmentCommitInfo info) |
ReadersAndUpdates(IndexWriter writer,
SegmentReader reader)
Init from a previously opened SegmentReader.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDVUpdate(DocValuesFieldUpdates update)
Adds a new resolved (meaning it maps docIDs to new values) doc values packet.
|
private boolean |
assertNoDupGen(java.util.List<DocValuesFieldUpdates> fieldUpdates,
DocValuesFieldUpdates update) |
void |
decRef() |
boolean |
delete(int docID) |
void |
dropChanges() |
void |
dropMergingUpdates()
Drops all merging updates.
|
void |
dropReaders() |
Bits |
getLiveDocs() |
java.util.Map<java.lang.String,java.util.List<DocValuesFieldUpdates>> |
getMergingDVUpdates() |
long |
getNumDVUpdates() |
int |
getPendingDeleteCount() |
SegmentReader |
getReader(IOContext context)
Returns a
SegmentReader. |
(package private) SegmentReader |
getReaderForMerge(IOContext context)
Returns a reader for merge, with the latest doc values updates and deletions.
|
SegmentReader |
getReadOnlyClone(IOContext context)
Returns a ref to a clone.
|
Bits |
getReadOnlyLiveDocs() |
private void |
handleBinaryDVUpdates(FieldInfos infos,
TrackingDirectoryWrapper dir,
DocValuesFormat dvFormat,
SegmentReader reader,
java.util.Map<java.lang.Integer,java.util.Set<java.lang.String>> fieldFiles,
long maxDelGen,
InfoStream infoStream) |
private void |
handleNumericDVUpdates(FieldInfos infos,
Directory dir,
DocValuesFormat dvFormat,
SegmentReader reader,
java.util.Map<java.lang.Integer,java.util.Set<java.lang.String>> fieldFiles,
long maxDelGen,
InfoStream infoStream) |
void |
incRef() |
private void |
initWritableLiveDocs() |
int |
refCount() |
void |
release(SegmentReader sr) |
void |
setIsMerging() |
java.lang.String |
toString() |
boolean |
verifyDocCounts() |
private java.util.Set<java.lang.String> |
writeFieldInfosGen(FieldInfos fieldInfos,
Directory dir,
DocValuesFormat dvFormat,
FieldInfosFormat infosFormat) |
boolean |
writeFieldUpdates(Directory dir,
long maxDelGen,
InfoStream infoStream) |
boolean |
writeLiveDocs(Directory dir) |
public final SegmentCommitInfo info
private final java.util.concurrent.atomic.AtomicInteger refCount
private final IndexWriter writer
private SegmentReader reader
private Bits liveDocs
private int pendingDeleteCount
private boolean liveDocsShared
private boolean isMerging
private final java.util.Map<java.lang.String,java.util.List<DocValuesFieldUpdates>> pendingDVUpdates
private final java.util.Map<java.lang.String,java.util.List<DocValuesFieldUpdates>> mergingDVUpdates
Sorter.DocMap sortMap
public final java.util.concurrent.atomic.AtomicLong ramBytesUsed
public ReadersAndUpdates(IndexWriter writer, SegmentCommitInfo info)
public ReadersAndUpdates(IndexWriter writer, SegmentReader reader)
NOTE: steals incoming ref from reader.
public void incRef()
public void decRef()
public int refCount()
public int getPendingDeleteCount()
private boolean assertNoDupGen(java.util.List<DocValuesFieldUpdates> fieldUpdates, DocValuesFieldUpdates update)
public void addDVUpdate(DocValuesFieldUpdates update)
public long getNumDVUpdates()
public boolean verifyDocCounts()
public SegmentReader getReader(IOContext context) throws java.io.IOException
SegmentReader.java.io.IOExceptionpublic void release(SegmentReader sr) throws java.io.IOException
java.io.IOExceptionpublic boolean delete(int docID)
throws java.io.IOException
java.io.IOExceptionpublic void dropReaders()
throws java.io.IOException
java.io.IOExceptionpublic SegmentReader getReadOnlyClone(IOContext context) throws java.io.IOException
java.io.IOExceptionprivate void initWritableLiveDocs()
throws java.io.IOException
java.io.IOExceptionpublic Bits getLiveDocs()
public Bits getReadOnlyLiveDocs()
public void dropChanges()
public boolean writeLiveDocs(Directory dir) throws java.io.IOException
java.io.IOExceptionprivate void handleNumericDVUpdates(FieldInfos infos, Directory dir, DocValuesFormat dvFormat, SegmentReader reader, java.util.Map<java.lang.Integer,java.util.Set<java.lang.String>> fieldFiles, long maxDelGen, InfoStream infoStream) throws java.io.IOException
java.io.IOExceptionprivate void handleBinaryDVUpdates(FieldInfos infos, TrackingDirectoryWrapper dir, DocValuesFormat dvFormat, SegmentReader reader, java.util.Map<java.lang.Integer,java.util.Set<java.lang.String>> fieldFiles, long maxDelGen, InfoStream infoStream) throws java.io.IOException
java.io.IOExceptionprivate java.util.Set<java.lang.String> writeFieldInfosGen(FieldInfos fieldInfos, Directory dir, DocValuesFormat dvFormat, FieldInfosFormat infosFormat) throws java.io.IOException
java.io.IOExceptionpublic boolean writeFieldUpdates(Directory dir, long maxDelGen, InfoStream infoStream) throws java.io.IOException
java.io.IOExceptionpublic void setIsMerging()
SegmentReader getReaderForMerge(IOContext context) throws java.io.IOException
java.io.IOExceptionpublic void dropMergingUpdates()
public java.util.Map<java.lang.String,java.util.List<DocValuesFieldUpdates>> getMergingDVUpdates()
public java.lang.String toString()
toString in class java.lang.Object