Interface CompactionSegmentManagement

  • All Known Subinterfaces:
    LeveldbCompaction, LeveldbStore
    All Known Implementing Classes:
    SharedLeveldbStore

    public interface CompactionSegmentManagement
    INTERNAL API.

    Calculates and stores info of compacted "segments" per persistence id.

    Assuming a compaction interval N for a given persistence id, then compaction is to be performed for segments of message sequence numbers according to the following pattern:

    [0, N), [N, 2*N), ... , [m*N, (m + 1)*N)

    Once deletion is performed up to a sequence number 'toSeqNr', then 'toSeqNr' will be used to determine the rightmost segment up to which compaction will be performed. Eligible segments for compaction are only considered to be those which include sequence numbers up to 'toSeqNr' AND whose size is equal to N (the compaction interval). This rule implies that if 'toSeqNr' spans an incomplete portion of a rightmost segment, then that segment will be omitted from the pending compaction, and will be included into the next one.

    • Method Detail

      • latestCompactionSegments_$eq

        void latestCompactionSegments_$eq​(scala.collection.immutable.Map<java.lang.String,​java.lang.Object> x$1)
      • compactionIntervals

        scala.collection.immutable.Map<java.lang.String,​java.lang.Object> compactionIntervals()
      • updateCompactionSegment

        void updateCompactionSegment​(java.lang.String persistenceId,
                                     long compactionSegment)
      • compactionLimit

        long compactionLimit​(java.lang.String persistenceId,
                             long toSeqNr)
      • compactionSegment

        long compactionSegment​(java.lang.String persistenceId,
                               long toSeqNr)
      • mustCompact

        boolean mustCompact​(java.lang.String persistenceId,
                            long toSeqNr)
      • isCompactionEnabled

        boolean isCompactionEnabled​(java.lang.String persistenceId)
      • isCompactionRequired

        boolean isCompactionRequired​(java.lang.String persistenceId,
                                     long toSeqNr)
      • latestCompactionSegment

        long latestCompactionSegment​(java.lang.String persistenceId)
      • compactionInterval

        long compactionInterval​(java.lang.String persistenceId)