]>
Commit | Line | Data |
---|---|---|
7c673cae | 1 | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. |
11fdf7f2 TL |
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). | |
7c673cae FG |
5 | |
6 | package org.rocksdb; | |
7 | ||
8 | /** | |
9 | * Checksum types used in conjunction with BlockBasedTable. | |
10 | */ | |
11 | public enum ChecksumType { | |
12 | /** | |
13 | * Not implemented yet. | |
14 | */ | |
15 | kNoChecksum((byte) 0), | |
16 | /** | |
17 | * CRC32 Checksum | |
18 | */ | |
19 | kCRC32c((byte) 1), | |
20 | /** | |
21 | * XX Hash | |
22 | */ | |
20effc67 TL |
23 | kxxHash((byte) 2), |
24 | /** | |
25 | * XX Hash 64 | |
26 | */ | |
27 | kxxHash64((byte) 3); | |
7c673cae FG |
28 | |
29 | /** | |
30 | * Returns the byte value of the enumerations value | |
31 | * | |
32 | * @return byte representation | |
33 | */ | |
34 | public byte getValue() { | |
35 | return value_; | |
36 | } | |
37 | ||
38 | private ChecksumType(byte value) { | |
39 | value_ = value; | |
40 | } | |
41 | ||
42 | private final byte value_; | |
43 | } |