Class PackWriterBitmapPreparer


  • class PackWriterBitmapPreparer
    extends java.lang.Object
    Helper class for the PackWriter to select commits for which to build pack index bitmaps.
    • Field Detail

      • ORDER_BY_REVERSE_TIMESTAMP

        private static final java.util.Comparator<RevCommit> ORDER_BY_REVERSE_TIMESTAMP
      • want

        private final java.util.Set<? extends ObjectId> want
      • contiguousCommitCount

        private final int contiguousCommitCount
      • recentCommitCount

        private final int recentCommitCount
      • recentCommitSpan

        private final int recentCommitSpan
      • distantCommitSpan

        private final int distantCommitSpan
      • excessiveBranchCount

        private final int excessiveBranchCount
      • inactiveBranchTimestamp

        private final long inactiveBranchTimestamp
    • Method Detail

      • selectCommits

        java.util.Collection<BitmapCommit> selectCommits​(int expectedCommitCount,
                                                         java.util.Set<? extends ObjectId> excludeFromBitmapSelection)
                                                  throws IncorrectObjectTypeException,
                                                         java.io.IOException,
                                                         MissingObjectException
        Returns the commit objects for which bitmap indices should be built.
        Parameters:
        expectedCommitCount - count of commits in the pack
        excludeFromBitmapSelection - commits that should be excluded from bitmap selection
        Returns:
        commit objects for which bitmap indices should be built
        Throws:
        IncorrectObjectTypeException - if any of the processed objects is not a commit
        java.io.IOException - on errors reading pack or index files
        MissingObjectException - if an expected object is missing
      • isRecentCommit

        private boolean isRecentCommit​(RevCommit revCommit)
      • nextSpan

        int nextSpan​(int distanceFromTip)