Package org.apache.lucene.index
Class SegmentInfos.FindSegmentsFile
java.lang.Object
org.apache.lucene.index.SegmentInfos.FindSegmentsFile
- Enclosing class:
- SegmentInfos
Utility 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 -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Object
Subclass must implement this.run()
Locate the most recentsegments
file and rundoBody(java.lang.String)
on it.run
(IndexCommit commit) RundoBody(java.lang.String)
on the provided commit.
-
Constructor Details
-
FindSegmentsFile
Sole constructor.
-
-
Method Details
-
run
Locate the most recentsegments
file and rundoBody(java.lang.String)
on it.- Throws:
IOException
-
run
RundoBody(java.lang.String)
on the provided commit.- Throws:
IOException
-
doBody
Subclass must implement this. The assumption is an IOException will be thrown if something goes wrong during the processing that could have been caused by a writer committing.- Throws:
IOException
-