|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.index.SegmentCommitInfo
public class SegmentCommitInfo
Embeds a [read-only] SegmentInfo and adds per-commit fields.
Field Summary | |
---|---|
SegmentInfo |
info
The SegmentInfo that we wrap. |
Constructor Summary | |
---|---|
SegmentCommitInfo(SegmentInfo info,
int delCount,
long delGen,
long fieldInfosGen)
Sole constructor. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final SegmentInfo info
SegmentInfo
that we wrap.
Constructor Detail |
---|
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)Method Detail |
---|
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 String toString()
toString
in class Object
public SegmentCommitInfo clone()
clone
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |