Interface CompactableLedgerStorage

All Superinterfaces:
LedgerStorage
All Known Implementing Classes:
InterleavedLedgerStorage, SingleDirectoryDbLedgerStorage, SortedLedgerStorage

public interface CompactableLedgerStorage extends LedgerStorage
Interface that identifies LedgerStorage implementations using EntryLogger and running periodic entries compaction.
  • Method Details

    • getActiveLedgersInRange

      Iterable<Long> getActiveLedgersInRange(long firstLedgerId, long lastLedgerId) throws IOException
      Get an iterator over a range of ledger ids stored in the bookie.
      Parameters:
      firstLedgerId - first ledger id in the sequence (included)
      lastLedgerId - last ledger id in the sequence (not included)
      Returns:
      Throws:
      IOException
    • updateEntriesLocations

      void updateEntriesLocations(Iterable<EntryLocation> locations) throws IOException
      Update the location of several entries.
      Parameters:
      locations - the list of locations to update
      Throws:
      IOException
    • flushEntriesLocationsIndex

      void flushEntriesLocationsIndex() throws IOException
      Flush the entries locations index for the compacted entries.
      Throws:
      IOException