Class CommitsImpl
- java.lang.Object
-
- org.apache.lucene.luke.models.LukeModel
-
- org.apache.lucene.luke.models.commits.CommitsImpl
-
-
Constructor Summary
Constructors Constructor Description CommitsImpl(DirectoryReader reader, String indexPath)Constructs a CommitsImpl that holds theDirectorywrapped in the givenDirectoryReader.CommitsImpl(Directory dir, String indexPath)Constructs a CommitsImpl that holds givenDirectory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<Commit>getCommit(long commitGen)Returns a commit of the specified generation.List<File>getFiles(long commitGen)Returns index files for the specified generation.Map<String,String>getSegmentAttributes(long commitGen, String name)Returns internal codec attributes map for the specified segment.Optional<Codec>getSegmentCodec(long commitGen, String name)Returns codec for the specified segment.Map<String,String>getSegmentDiagnostics(long commitGen, String name)Returns diagnotics for the specified segment.List<Segment>getSegments(long commitGen)Returns segments for the specified generation.List<Commit>listCommits()Returns commits that exists in this Directory.-
Methods inherited from class org.apache.lucene.luke.models.LukeModel
getFieldNames
-
-
-
-
Constructor Detail
-
CommitsImpl
public CommitsImpl(Directory dir, String indexPath)
Constructs a CommitsImpl that holds givenDirectory.- Parameters:
dir- - the index directoryindexPath- - the path to index directory
-
CommitsImpl
public CommitsImpl(DirectoryReader reader, String indexPath)
Constructs a CommitsImpl that holds theDirectorywrapped in the givenDirectoryReader.- Parameters:
reader- - the index readerindexPath- - the path to index directory
-
-
Method Detail
-
listCommits
public List<Commit> listCommits() throws LukeException
Description copied from interface:CommitsReturns commits that exists in this Directory.- Specified by:
listCommitsin interfaceCommits- Throws:
LukeException- - if an internal error occurs when accessing index
-
getCommit
public Optional<Commit> getCommit(long commitGen) throws LukeException
Description copied from interface:CommitsReturns a commit of the specified generation.- Specified by:
getCommitin interfaceCommits- Parameters:
commitGen- - generation- Throws:
LukeException- - if an internal error occurs when accessing index
-
getFiles
public List<File> getFiles(long commitGen) throws LukeException
Description copied from interface:CommitsReturns index files for the specified generation.- Specified by:
getFilesin interfaceCommits- Parameters:
commitGen- - generation- Throws:
LukeException- - if an internal error occurs when accessing index
-
getSegments
public List<Segment> getSegments(long commitGen) throws LukeException
Description copied from interface:CommitsReturns segments for the specified generation.- Specified by:
getSegmentsin interfaceCommits- Parameters:
commitGen- - generation- Throws:
LukeException- - if an internal error occurs when accessing index
-
getSegmentAttributes
public Map<String,String> getSegmentAttributes(long commitGen, String name) throws LukeException
Description copied from interface:CommitsReturns internal codec attributes map for the specified segment.- Specified by:
getSegmentAttributesin interfaceCommits- Parameters:
commitGen- - generationname- - segment name- Throws:
LukeException- - if an internal error occurs when accessing index
-
getSegmentDiagnostics
public Map<String,String> getSegmentDiagnostics(long commitGen, String name) throws LukeException
Description copied from interface:CommitsReturns diagnotics for the specified segment.- Specified by:
getSegmentDiagnosticsin interfaceCommits- Parameters:
commitGen- - generationname- - segment name- Throws:
LukeException- - if an internal error occurs when accessing index
-
getSegmentCodec
public Optional<Codec> getSegmentCodec(long commitGen, String name) throws LukeException
Description copied from interface:CommitsReturns codec for the specified segment.- Specified by:
getSegmentCodecin interfaceCommits- Parameters:
commitGen- - generationname- - segment name- Throws:
LukeException- - if an internal error occurs when accessing index
-
-