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.ObjectAbstract entry log compactor used for compaction.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceAbstractLogCompactor.LogRemovalListenerLogRemovalListener.static classAbstractLogCompactor.Throttlerclass Throttler.
-
Field Summary
Fields Modifier and Type Field Description protected ServerConfigurationconfprotected AbstractLogCompactor.LogRemovalListenerlogRemovalListenerprotected AbstractLogCompactor.Throttlerthrottler
-
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 voidcleanUpAndRecover()Do nothing by default.abstract booleancompact(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.
-
-