C# Class Lucene.Net.Index.SegmentInfos.FindSegmentsFile

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.
Exibir arquivo Open project: paulirwin/lucene.net

Public Methods

Method Description
Run ( ) : object

Locate the most recent {@code segments} file and run #doBody on it.

Run ( IndexCommit commit ) : object

Run #doBody on the provided commit.

Protected Methods

Method Description
DoBody ( string segmentFileName ) : object

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.

FindSegmentsFile ( Directory directory ) : System

Sole constructor.

Method Details

DoBody() protected abstract method

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.
protected abstract DoBody ( string segmentFileName ) : object
segmentFileName string
return object

FindSegmentsFile() protected method

Sole constructor.
protected FindSegmentsFile ( Directory directory ) : System
directory Directory
return System

Run() public method

Locate the most recent {@code segments} file and run #doBody on it.
public Run ( ) : object
return object

Run() public method

Run #doBody on the provided commit.
public Run ( IndexCommit commit ) : object
commit IndexCommit
return object