]>
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 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 * 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 private final long nativeHandle_
;
21 public DirectComparator(final ComparatorOptions copt
) {
23 this.nativeHandle_
= createNewDirectComparator0(copt
.nativeHandle_
);
27 protected final long getNativeHandle() {
31 private native long createNewDirectComparator0(
32 final long comparatorOptionsHandle
);