Class SegmentInfos.FindSegmentsFile

  • Enclosing class:
    SegmentInfos

    public abstract static class SegmentInfos.FindSegmentsFile
    extends java.lang.Object
    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 Detail

      • FindSegmentsFile

        public FindSegmentsFile​(Directory directory)
        Sole constructor.
    • Method Detail

      • run

        public java.lang.Object run()
                             throws java.io.IOException
        Locate the most recent segments file and run doBody(java.lang.String) on it.
        Throws:
        java.io.IOException