]>
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 | */ | |
1e59de90 TL |
27 | kxxHash64((byte) 3), |
28 | ||
29 | kXXH3((byte) 4); | |
7c673cae FG |
30 | |
31 | /** | |
32 | * Returns the byte value of the enumerations value | |
33 | * | |
34 | * @return byte representation | |
35 | */ | |
36 | public byte getValue() { | |
37 | return value_; | |
38 | } | |
39 | ||
1e59de90 | 40 | private ChecksumType(final byte value) { |
7c673cae FG |
41 | value_ = value; |
42 | } | |
43 | ||
44 | private final byte value_; | |
45 | } |