public enum Compaction extends Enum<Compaction>
Log compaction comes in two forms: MINOR and MAJOR. This enum provides identifiers
to indicate the log compaction type when compacting the log.
Passing an explicit Compaction type will run the appropriate compaction process asynchronously.
log.compactor().compact(Compaction.MAJOR);
| Modifier and Type | Class and Description |
|---|---|
static class |
Compaction.Mode
Constants for specifying entry compaction modes.
|
| Enum Constant and Description |
|---|
MAJOR
Represents a major compaction.
|
MINOR
Represents a minor compaction.
|
| Modifier and Type | Method and Description |
|---|---|
static Compaction |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Compaction[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Compaction MINOR
Minor compaction is the more efficient of the compaction processes which removes
cleaned non-tombstone entries from individual
Segments. See the MinorCompactionTask for more information.
public static final Compaction MAJOR
Major compaction is the more heavyweight process of removing all
cleaned entries that have been
committed to the log and combining segment
files wherever possible. See the MajorCompactionTask for more information.
public static Compaction[] values()
for (Compaction c : Compaction.values()) System.out.println(c);
public static Compaction valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2013–2016. All rights reserved.