|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.index.SegmentInfos.FindSegmentsFile
public abstract static class 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.
Constructor Summary | |
---|---|
SegmentInfos.FindSegmentsFile(Directory directory)
Sole constructor. |
Method Summary | |
---|---|
protected abstract Object |
doBody(String segmentFileName)
Subclass must implement this. |
Object |
run()
Locate the most recent segments file and
run doBody(java.lang.String) on it. |
Object |
run(IndexCommit commit)
Run doBody(java.lang.String) on the provided commit. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SegmentInfos.FindSegmentsFile(Directory directory)
Method Detail |
---|
public Object run() throws IOException
segments
file and
run doBody(java.lang.String)
on it.
IOException
public Object run(IndexCommit commit) throws IOException
doBody(java.lang.String)
on the provided commit.
IOException
protected abstract Object doBody(String segmentFileName) throws IOException
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |