]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/java/src/main/java/org/rocksdb/FlushReason.java
1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under both the GPLv2 (found in the
3 // COPYING file in the root directory) and Apache 2.0 License
4 // (found in the LICENSE.Apache file in the root directory).
8 public enum FlushReason
{
10 GET_LIVE_FILES((byte) 0x01),
11 SHUTDOWN((byte) 0x02),
12 EXTERNAL_FILE_INGESTION((byte) 0x03),
13 MANUAL_COMPACTION((byte) 0x04),
14 WRITE_BUFFER_MANAGER((byte) 0x05),
15 WRITE_BUFFER_FULL((byte) 0x06),
17 DELETE_FILES((byte) 0x08),
18 AUTO_COMPACTION((byte) 0x09),
19 MANUAL_FLUSH((byte) 0x0a),
20 ERROR_RECOVERY((byte) 0xb);
22 private final byte value
;
24 FlushReason(final byte value
) {
29 * Get the internal representation.
31 * @return the internal representation
38 * Get the FlushReason from the internal representation value.
40 * @return the flush reason.
42 * @throws IllegalArgumentException if the value is unknown.
44 static FlushReason
fromValue(final byte value
) {
45 for (final FlushReason flushReason
: FlushReason
.values()) {
46 if (flushReason
.value
== value
) {
51 throw new IllegalArgumentException("Illegal value provided for FlushReason: " + value
);