]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/java/src/main/java/org/rocksdb/Priority.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).
9 * The Thread Pool priority.
11 public enum Priority
{
17 private final byte value
;
19 Priority(final byte value
) {
24 * <p>Returns the byte value of the enumerations value.</p>
26 * @return byte representation
33 * Get Priority by byte value.
35 * @param value byte representation of Priority.
37 * @return {@link org.rocksdb.Priority} instance.
38 * @throws java.lang.IllegalArgumentException if an invalid
41 static Priority
getPriority(final byte value
) {
42 for (final Priority priority
: Priority
.values()) {
43 if (priority
.getValue() == value
){
47 throw new IllegalArgumentException("Illegal value provided for Priority.");