Package org.apache.bookkeeper.bookie
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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.bookkeeper.bookie.LedgerStorage
LedgerStorage.DetectedInconsistency, LedgerStorage.LedgerDeletionListener, LedgerStorage.StorageState
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
flushEntriesLocationsIndex()
Flush the entries locations index for the compacted entries.java.lang.Iterable<java.lang.Long>
getActiveLedgersInRange(long firstLedgerId, long lastLedgerId)
Get an iterator over a range of ledger ids stored in the bookie.void
updateEntriesLocations(java.lang.Iterable<EntryLocation> locations)
Update the location of several entries.-
Methods inherited from interface org.apache.bookkeeper.bookie.LedgerStorage
addEntry, cancelWaitForLastAddConfirmedUpdate, checkpoint, clearLimboState, clearStorageStateFlag, deleteLedger, entryExists, entryLocationCompact, entryLocationCompact, flush, forceGC, forceGC, getEntry, getEntryLocationDBPath, getExplicitLac, getGarbageCollectionStatus, getLastAddConfirmed, getListOfEntriesOfLedger, getStorageStateFlags, getUnderlyingLedgerStorage, hasLimboState, initialize, isEntryLocationCompacting, isEntryLocationCompacting, isFenced, isInForceGC, isMajorGcSuspended, isMinorGcSuspended, ledgerExists, localConsistencyCheck, readMasterKey, registerLedgerDeletionListener, resumeMajorGC, resumeMinorGC, setCheckpointer, setCheckpointSource, setExplicitLac, setFenced, setLimboState, setMasterKey, setStateManager, setStorageStateFlag, shutdown, start, suspendMajorGC, suspendMinorGC, waitForLastAddConfirmedUpdate
-
-
-
-
Method Detail
-
getActiveLedgersInRange
java.lang.Iterable<java.lang.Long> getActiveLedgersInRange(long firstLedgerId, long lastLedgerId) throws java.io.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:
java.io.IOException
-
updateEntriesLocations
void updateEntriesLocations(java.lang.Iterable<EntryLocation> locations) throws java.io.IOException
Update the location of several entries.- Parameters:
locations
- the list of locations to update- Throws:
java.io.IOException
-
flushEntriesLocationsIndex
void flushEntriesLocationsIndex() throws java.io.IOException
Flush the entries locations index for the compacted entries.- Throws:
java.io.IOException
-
-