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 theDirectory
wrapped 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 theDirectory
wrapped 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:Commits
Returns commits that exists in this Directory.- Specified by:
listCommits
in interfaceCommits
- Throws:
LukeException
- - if an internal error occurs when accessing index
-
getCommit
public Optional<Commit> getCommit(long commitGen) throws LukeException
Description copied from interface:Commits
Returns a commit of the specified generation.- Specified by:
getCommit
in 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:Commits
Returns index files for the specified generation.- Specified by:
getFiles
in 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:Commits
Returns segments for the specified generation.- Specified by:
getSegments
in 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:Commits
Returns internal codec attributes map for the specified segment.- Specified by:
getSegmentAttributes
in 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:Commits
Returns diagnotics for the specified segment.- Specified by:
getSegmentDiagnostics
in 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:Commits
Returns codec for the specified segment.- Specified by:
getSegmentCodec
in interfaceCommits
- Parameters:
commitGen
- - generationname
- - segment name- Throws:
LukeException
- - if an internal error occurs when accessing index
-
-