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 Details

    • latestCompactionSegments_$eq

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

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

      void updateCompactionSegment(String persistenceId, long compactionSegment)
    • compactionLimit

      long compactionLimit(String persistenceId, long toSeqNr)
    • compactionSegment

      long compactionSegment(String persistenceId, long toSeqNr)
    • mustCompact

      boolean mustCompact(String persistenceId, long toSeqNr)
    • isCompactionEnabled

      boolean isCompactionEnabled(String persistenceId)
    • isCompactionRequired

      boolean isCompactionRequired(String persistenceId, long toSeqNr)
    • latestCompactionSegment

      long latestCompactionSegment(String persistenceId)
    • compactionInterval

      long compactionInterval(String persistenceId)