public class SegmentCommitInfo
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private long |
bufferedDeletesGen |
private int |
delCount |
private long |
delGen |
private long |
docValuesGen |
private java.util.Map<java.lang.Integer,java.util.Set<java.lang.String>> |
dvUpdatesFiles |
private java.util.Set<java.lang.String> |
fieldInfosFiles |
private long |
fieldInfosGen |
SegmentInfo |
info
The
SegmentInfo that we wrap. |
private long |
nextWriteDelGen |
private long |
nextWriteDocValuesGen |
private long |
nextWriteFieldInfosGen |
private long |
sizeInBytes |
private int |
softDelCount |
Constructor and Description |
---|
SegmentCommitInfo(SegmentInfo info,
int delCount,
int softDelCount,
long delGen,
long fieldInfosGen,
long docValuesGen)
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
advanceDelGen()
Called when we succeed in writing deletes
|
(package private) void |
advanceDocValuesGen()
Called when we succeed in writing a new DocValues generation.
|
(package private) void |
advanceFieldInfosGen()
Called when we succeed in writing a new FieldInfos generation.
|
(package private) void |
advanceNextWriteDelGen()
Called if there was an exception while writing
deletes, so that we don't try to write to the same
file more than once.
|
(package private) void |
advanceNextWriteDocValuesGen()
Called if there was an exception while writing a new generation of
DocValues, so that we don't try to write to the same file more than once.
|
(package private) void |
advanceNextWriteFieldInfosGen()
Called if there was an exception while writing a new generation of
FieldInfos, so that we don't try to write to the same file more than once.
|
SegmentCommitInfo |
clone() |
java.util.Collection<java.lang.String> |
files()
Returns all files in use by this segment.
|
(package private) long |
getBufferedDeletesGen() |
int |
getDelCount()
Returns the number of deleted docs in the segment.
|
(package private) int |
getDelCount(boolean includeSoftDeletes) |
long |
getDelGen()
Returns generation number of the live docs file
or -1 if there are no deletes yet.
|
long |
getDocValuesGen()
Returns the generation number of the DocValues file or -1 if there are no
doc-values updates yet.
|
java.util.Map<java.lang.Integer,java.util.Set<java.lang.String>> |
getDocValuesUpdatesFiles()
Returns the per-field DocValues updates files.
|
java.util.Set<java.lang.String> |
getFieldInfosFiles()
Returns the FieldInfos file names.
|
long |
getFieldInfosGen()
Returns the generation number of the field infos file or -1 if there are no
field updates yet.
|
long |
getNextDelGen()
Returns the next available generation number
of the live docs file.
|
long |
getNextDocValuesGen()
Returns the next available generation number of the DocValues files.
|
long |
getNextFieldInfosGen()
Returns the next available generation number of the FieldInfos files.
|
(package private) long |
getNextWriteDelGen()
Gets the nextWriteDelGen.
|
(package private) long |
getNextWriteDocValuesGen()
Gets the nextWriteDocValuesGen.
|
(package private) long |
getNextWriteFieldInfosGen()
Gets the nextWriteFieldInfosGen.
|
int |
getSoftDelCount()
Returns the number of only soft-deleted docs.
|
boolean |
hasDeletions()
Returns true if there are any deletions for the
segment at this commit.
|
boolean |
hasFieldUpdates()
Returns true if there are any field updates for the segment in this commit.
|
(package private) void |
setBufferedDeletesGen(long v) |
(package private) void |
setDelCount(int delCount) |
void |
setDocValuesUpdatesFiles(java.util.Map<java.lang.Integer,java.util.Set<java.lang.String>> dvUpdatesFiles)
Sets the DocValues updates file names, per field number.
|
void |
setFieldInfosFiles(java.util.Set<java.lang.String> fieldInfosFiles)
Sets the FieldInfos file names.
|
(package private) void |
setNextWriteDelGen(long v)
Sets the nextWriteDelGen.
|
(package private) void |
setNextWriteDocValuesGen(long v)
Sets the nextWriteDocValuesGen.
|
(package private) void |
setNextWriteFieldInfosGen(long v)
Sets the nextWriteFieldInfosGen.
|
(package private) void |
setSoftDelCount(int softDelCount) |
long |
sizeInBytes()
Returns total size in bytes of all files for this
segment.
|
java.lang.String |
toString() |
java.lang.String |
toString(int pendingDelCount)
Returns a description of this segment.
|
public final SegmentInfo info
SegmentInfo
that we wrap.private int delCount
private int softDelCount
private long delGen
private long nextWriteDelGen
private long fieldInfosGen
private long nextWriteFieldInfosGen
private long docValuesGen
private long nextWriteDocValuesGen
private final java.util.Map<java.lang.Integer,java.util.Set<java.lang.String>> dvUpdatesFiles
private final java.util.Set<java.lang.String> fieldInfosFiles
private volatile long sizeInBytes
private long bufferedDeletesGen
public SegmentCommitInfo(SegmentInfo info, int delCount, int softDelCount, long delGen, long fieldInfosGen, long docValuesGen)
info
- SegmentInfo
that we wrapdelCount
- number of deleted documents in this segmentdelGen
- deletion generation number (used to name deletion files)fieldInfosGen
- FieldInfos generation number (used to name field-infos files)docValuesGen
- DocValues generation number (used to name doc-values updates files)public java.util.Map<java.lang.Integer,java.util.Set<java.lang.String>> getDocValuesUpdatesFiles()
public void setDocValuesUpdatesFiles(java.util.Map<java.lang.Integer,java.util.Set<java.lang.String>> dvUpdatesFiles)
public java.util.Set<java.lang.String> getFieldInfosFiles()
public void setFieldInfosFiles(java.util.Set<java.lang.String> fieldInfosFiles)
void advanceDelGen()
void advanceNextWriteDelGen()
long getNextWriteDelGen()
void setNextWriteDelGen(long v)
void advanceFieldInfosGen()
void advanceNextWriteFieldInfosGen()
long getNextWriteFieldInfosGen()
void setNextWriteFieldInfosGen(long v)
void advanceDocValuesGen()
void advanceNextWriteDocValuesGen()
long getNextWriteDocValuesGen()
void setNextWriteDocValuesGen(long v)
public long sizeInBytes() throws java.io.IOException
java.io.IOException
public java.util.Collection<java.lang.String> files() throws java.io.IOException
java.io.IOException
long getBufferedDeletesGen()
void setBufferedDeletesGen(long v)
public boolean hasDeletions()
public boolean hasFieldUpdates()
public long getNextFieldInfosGen()
public long getFieldInfosGen()
public long getNextDocValuesGen()
public long getDocValuesGen()
public long getNextDelGen()
public long getDelGen()
public int getDelCount()
public int getSoftDelCount()
void setDelCount(int delCount)
void setSoftDelCount(int softDelCount)
public java.lang.String toString(int pendingDelCount)
public java.lang.String toString()
toString
in class java.lang.Object
public SegmentCommitInfo clone()
clone
in class java.lang.Object
final int getDelCount(boolean includeSoftDeletes)