]> git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/java/src/main/java/org/rocksdb/CompactionStyle.java
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / rocksdb / java / src / main / java / org / rocksdb / CompactionStyle.java
1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under the BSD-style license found in the
3 // LICENSE file in the root directory of this source tree. An additional grant
4 // of patent rights can be found in the PATENTS file in the same directory.
5
6 package org.rocksdb;
7
8 /**
9 * Enum CompactionStyle
10 *
11 * RocksDB supports different styles of compaction. Available
12 * compaction styles can be chosen using this enumeration.
13 *
14 * <ol>
15 * <li><strong>LEVEL</strong> - Level based Compaction style</li>
16 * <li><strong>UNIVERSAL</strong> - Universal Compaction Style is a
17 * compaction style, targeting the use cases requiring lower write
18 * amplification, trading off read amplification and space
19 * amplification.</li>
20 * <li><strong>FIFO</strong> - FIFO compaction style is the simplest
21 * compaction strategy. It is suited for keeping event log data with
22 * very low overhead (query log for example). It periodically deletes
23 * the old data, so it's basically a TTL compaction style.</li>
24 * </ol>
25 *
26 * @see <a
27 * href="https://github.com/facebook/rocksdb/wiki/Universal-Compaction">
28 * Universal Compaction</a>
29 * @see <a
30 * href="https://github.com/facebook/rocksdb/wiki/FIFO-compaction-style">
31 * FIFO Compaction</a>
32 */
33 public enum CompactionStyle {
34 LEVEL((byte) 0),
35 UNIVERSAL((byte) 1),
36 FIFO((byte) 2);
37
38 private final byte value_;
39
40 private CompactionStyle(byte value) {
41 value_ = value;
42 }
43
44 /**
45 * Returns the byte value of the enumerations value
46 *
47 * @return byte representation
48 */
49 public byte getValue() {
50 return value_;
51 }
52 }