]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/java/src/main/java/org/rocksdb/AccessHint.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.
9 * File access pattern once a compaction has started
11 public enum AccessHint
{
14 SEQUENTIAL((byte)0x2),
17 private final byte value
;
19 AccessHint(final byte value
) {
24 * <p>Returns the byte value of the enumerations value.</p>
26 * @return byte representation
28 public byte getValue() {
33 * <p>Get the AccessHint enumeration value by
34 * passing the byte identifier to this method.</p>
36 * @param byteIdentifier of AccessHint.
38 * @return AccessHint instance.
40 * @throws IllegalArgumentException if the access hint for the byteIdentifier
43 public static AccessHint
getAccessHint(final byte byteIdentifier
) {
44 for (final AccessHint accessHint
: AccessHint
.values()) {
45 if (accessHint
.getValue() == byteIdentifier
) {
50 throw new IllegalArgumentException(
51 "Illegal value provided for AccessHint.");