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,DocValuesFieldUpdates> |
mergingDVUpdates |
private int |
pendingDeleteCount |
private SegmentReader |
reader |
private java.util.concurrent.atomic.AtomicInteger |
refCount |
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 |
decRef() |
boolean |
delete(int docID) |
void |
dropChanges() |
void |
dropMergingUpdates()
Drops all merging updates.
|
void |
dropReaders() |
Bits |
getLiveDocs() |
java.util.Map<java.lang.String,DocValuesFieldUpdates> |
getMergingFieldUpdates()
Returns updates that came in while this segment was merging.
|
int |
getPendingDeleteCount() |
SegmentReader |
getReader(IOContext context)
Returns a
SegmentReader. |
(package private) SegmentReader |
getReaderForMerge(IOContext context)
Returns a reader for merge.
|
SegmentReader |
getReadOnlyClone(IOContext context)
Returns a ref to a clone.
|
Bits |
getReadOnlyLiveDocs() |
private void |
handleBinaryDVUpdates(FieldInfos infos,
java.util.Map<java.lang.String,BinaryDocValuesFieldUpdates> updates,
TrackingDirectoryWrapper dir,
DocValuesFormat dvFormat,
SegmentReader reader,
java.util.Map<java.lang.Integer,java.util.Set<java.lang.String>> fieldFiles) |
private void |
handleNumericDVUpdates(FieldInfos infos,
java.util.Map<java.lang.String,NumericDocValuesFieldUpdates> updates,
Directory dir,
DocValuesFormat dvFormat,
SegmentReader reader,
java.util.Map<java.lang.Integer,java.util.Set<java.lang.String>> fieldFiles) |
void |
incRef() |
void |
initWritableLiveDocs() |
int |
refCount() |
void |
release(SegmentReader sr) |
java.lang.String |
toString() |
boolean |
verifyDocCounts() |
private java.util.Set<java.lang.String> |
writeFieldInfosGen(FieldInfos fieldInfos,
Directory dir,
DocValuesFormat dvFormat,
FieldInfosFormat infosFormat) |
void |
writeFieldUpdates(Directory dir,
DocValuesFieldUpdates.Container dvUpdates) |
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,DocValuesFieldUpdates> mergingDVUpdates
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()
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)
public void dropReaders()
throws java.io.IOException
java.io.IOExceptionpublic SegmentReader getReadOnlyClone(IOContext context) throws java.io.IOException
java.io.IOExceptionpublic 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, java.util.Map<java.lang.String,NumericDocValuesFieldUpdates> updates, Directory dir, DocValuesFormat dvFormat, SegmentReader reader, java.util.Map<java.lang.Integer,java.util.Set<java.lang.String>> fieldFiles) throws java.io.IOException
java.io.IOExceptionprivate void handleBinaryDVUpdates(FieldInfos infos, java.util.Map<java.lang.String,BinaryDocValuesFieldUpdates> updates, TrackingDirectoryWrapper dir, DocValuesFormat dvFormat, SegmentReader reader, java.util.Map<java.lang.Integer,java.util.Set<java.lang.String>> fieldFiles) 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 void writeFieldUpdates(Directory dir, DocValuesFieldUpdates.Container dvUpdates) throws java.io.IOException
java.io.IOExceptionSegmentReader getReaderForMerge(IOContext context) throws java.io.IOException
java.io.IOExceptionpublic void dropMergingUpdates()
public java.util.Map<java.lang.String,DocValuesFieldUpdates> getMergingFieldUpdates()
public java.lang.String toString()
toString in class java.lang.Object