public class SegmentCommitInfo extends Object
Modifier and Type | Field and Description |
---|---|
SegmentInfo |
info
The
SegmentInfo that we wrap. |
Constructor and Description |
---|
SegmentCommitInfo(SegmentInfo info,
int delCount,
long delGen,
long fieldInfosGen)
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
SegmentCommitInfo |
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 |
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 |
getNextFieldInfosGen()
Returns the next available generation number of the FieldInfos files.
|
Map<Long,Set<String>> |
getUpdatesFiles()
Returns the per generation updates files.
|
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.
|
void |
setGenUpdatesFiles(Map<Long,Set<String>> genUpdatesFiles)
Sets the updates file names per generation.
|
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 SegmentCommitInfo(SegmentInfo info, int delCount, long delGen, long fieldInfosGen)
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)public Map<Long,Set<String>> getUpdatesFiles()
public void setGenUpdatesFiles(Map<Long,Set<String>> genUpdatesFiles)
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 boolean hasDeletions()
public boolean hasFieldUpdates()
public long getNextFieldInfosGen()
public long getFieldInfosGen()
public long getNextDelGen()
public long getDelGen()
public int getDelCount()
public String toString(Directory dir, int pendingDelCount)
public SegmentCommitInfo clone()
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.