Package org.apache.lucene.index
Class SegmentInfos.FindSegmentsFile
- java.lang.Object
-
- org.apache.lucene.index.SegmentInfos.FindSegmentsFile
-
- Enclosing class:
- SegmentInfos
public abstract static class SegmentInfos.FindSegmentsFile extends java.lang.ObjectUtility class for executing code that needs to do something with the current segments file. This is necessary with lock-less commits because from the time you locate the current segments file name, until you actually open it, read its contents, or check modified time, etc., it could have been deleted due to a writer commit finishing.
-
-
Constructor Summary
Constructors Constructor Description FindSegmentsFile(Directory directory)Sole constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectrun()Locate the most recentsegmentsfile and rundoBody(java.lang.String)on it.java.lang.Objectrun(IndexCommit commit)RundoBody(java.lang.String)on the provided commit.
-
-
-
Constructor Detail
-
FindSegmentsFile
public FindSegmentsFile(Directory directory)
Sole constructor.
-
-
Method Detail
-
run
public java.lang.Object run() throws java.io.IOExceptionLocate the most recentsegmentsfile and rundoBody(java.lang.String)on it.- Throws:
java.io.IOException
-
run
public java.lang.Object run(IndexCommit commit) throws java.io.IOException
RundoBody(java.lang.String)on the provided commit.- Throws:
java.io.IOException
-
-