]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/java/src/main/java/org/rocksdb/DirectComparator.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 * Base class for comparators which will receive
10 * ByteBuffer based access via org.rocksdb.DirectSlice
11 * in their compare method implementation.
13 * ByteBuffer based slices perform better when large keys
14 * are involved. When using smaller keys consider
15 * using @see org.rocksdb.Comparator
17 public abstract class DirectComparator
extends AbstractComparator
<DirectSlice
> {
19 public DirectComparator(final ComparatorOptions copt
) {
24 protected long initializeNative(final long... nativeParameterHandles
) {
25 return createNewDirectComparator0(nativeParameterHandles
[0]);
29 final ComparatorType
getComparatorType() {
30 return ComparatorType
.JAVA_DIRECT_COMPARATOR
;
33 private native long createNewDirectComparator0(
34 final long comparatorOptionsHandle
);