Package org.apache.bookkeeper.bookie
Class AbstractLogCompactor
- java.lang.Object
-
- org.apache.bookkeeper.bookie.AbstractLogCompactor
-
- Direct Known Subclasses:
EntryLogCompactor
,TransactionalEntryLogCompactor
public abstract class AbstractLogCompactor extends java.lang.Object
Abstract entry log compactor used for compaction.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
AbstractLogCompactor.LogRemovalListener
LogRemovalListener.static class
AbstractLogCompactor.Throttler
class Throttler.
-
Field Summary
Fields Modifier and Type Field Description protected ServerConfiguration
conf
protected AbstractLogCompactor.LogRemovalListener
logRemovalListener
protected AbstractLogCompactor.Throttler
throttler
-
Constructor Summary
Constructors Constructor Description AbstractLogCompactor(ServerConfiguration conf, AbstractLogCompactor.LogRemovalListener logRemovalListener)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
cleanUpAndRecover()
Do nothing by default.abstract boolean
compact(EntryLogMetadata entryLogMeta)
Compact entry log file.
-
-
-
Field Detail
-
conf
protected final ServerConfiguration conf
-
throttler
protected final AbstractLogCompactor.Throttler throttler
-
logRemovalListener
protected final AbstractLogCompactor.LogRemovalListener logRemovalListener
-
-
Constructor Detail
-
AbstractLogCompactor
public AbstractLogCompactor(ServerConfiguration conf, AbstractLogCompactor.LogRemovalListener logRemovalListener)
-
-
Method Detail
-
compact
public abstract boolean compact(EntryLogMetadata entryLogMeta)
Compact entry log file.- Parameters:
entryLogMeta
- log metadata for the entry log to be compacted- Returns:
- true for succeed
-
cleanUpAndRecover
public void cleanUpAndRecover()
Do nothing by default. Intended for subclass to override this method.
-
-