public enum StorageLevel extends Enum<StorageLevel>
Logstorage level configuration values which control how logs are stored on disk or in memory.
Storage levels represent the method used to store the individual
segments that make up a
Log. When configuring a
Storage module, the storage can be configured to write
entries to disk, memory, or memory-mapped files using the
values provided by this enum. The
StorageLevel configuration dictates the type of
Buffer to which to write entries. See the specific storage levels for more
|Enum Constant and Description|
Stores logs on disk.
Stores logs in memory mapped files.
Stores logs in memory only.
|Modifier and Type||Method and Description|
Returns the enum constant of this type with the specified name.
Returns an array containing the constants of this enum type, in the order they are declared.
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
public static final StorageLevel MEMORY
public static final StorageLevel MAPPED
Memory mapped logs will be written to
segments backed by
Entries written to memory mapped files may be recovered after a crash, but the
MAPPED storage level does not
guarantee that all entries written to the log will be persisted. Additionally, the use of persistent storage
levels reduces the amount of overhead required to catch the log up at startup.
public static final StorageLevel DISK
On-disk logs will be written to
segments backed by
in turn is backed by
RandomAccessFile. Entries written to
DISK storage can be recovered in the
event of a failure or other restart. Additionally, the use of persistent storage levels reduces the amount of overhead
required to catch the log up at startup.
public static StorageLevel values()
for (StorageLevel c : StorageLevel.values()) System.out.println(c);
public static StorageLevel valueOf(String name)
Copyright © 2013–2017. All rights reserved.