Class CommitsImpl

    • Constructor Detail

      • CommitsImpl

        public CommitsImpl​(Directory dir,
                           String indexPath)
        Constructs a CommitsImpl that holds given Directory.
        Parameters:
        dir - - the index directory
        indexPath - - the path to index directory
      • CommitsImpl

        public CommitsImpl​(DirectoryReader reader,
                           String indexPath)
        Constructs a CommitsImpl that holds the Directory wrapped in the given DirectoryReader.
        Parameters:
        reader - - the index reader
        indexPath - - the path to index directory
    • Method Detail

      • 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 interface Commits
        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 interface Commits
        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 interface Commits
        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 interface Commits
        Parameters:
        commitGen - - generation
        name - - 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 interface Commits
        Parameters:
        commitGen - - generation
        name - - 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 interface Commits
        Parameters:
        commitGen - - generation
        name - - segment name
        Throws:
        LukeException - - if an internal error occurs when accessing index