public class SegmentInfoPerCommit extends Object
Modifier and Type | Field and Description |
---|---|
SegmentInfo |
info
The
SegmentInfo that we wrap. |
Constructor and Description |
---|
SegmentInfoPerCommit(SegmentInfo info,
int delCount,
long delGen)
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
SegmentInfoPerCommit |
clone() |
Collection<String> |
files()
Returns all files in use by this segment.
|
int |
getDelCount()
Returns the number of deleted docs in the segment.
|
long |
getDelGen()
Returns generation number of the live docs file
or -1 if there are no deletes yet.
|
long |
getNextDelGen()
Returns the next available generation number
of the live docs file.
|
boolean |
hasDeletions()
Returns true if there are any deletions for the
segment at this commit.
|
void |
setDelGen(long delGen)
Sets the generation number of the live docs file.
|
long |
sizeInBytes()
Returns total size in bytes of all files for this
segment.
|
String |
toString() |
String |
toString(Directory dir,
int pendingDelCount)
Returns a description of this segment.
|
public final SegmentInfo info
SegmentInfo
that we wrap.public SegmentInfoPerCommit(SegmentInfo info, int delCount, long delGen)
info
- SegmentInfo
that we wrapdelCount
- number of deleted documents in this segmentdelGen
- deletion generation number (used to name
deletion files)public long sizeInBytes() throws IOException
NOTE: This value is not correct for 3.0 segments that have shared docstores. To get the correct value, upgrade!
IOException
public Collection<String> files() throws IOException
IOException
public void setDelGen(long delGen)
getDelGen()
public boolean hasDeletions()
public long getNextDelGen()
public long getDelGen()
public int getDelCount()
public String toString(Directory dir, int pendingDelCount)
public SegmentInfoPerCommit clone()
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.