]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rocksdb/java/src/main/java/org/rocksdb/Comparator.java
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / rocksdb / java / src / main / java / org / rocksdb / Comparator.java
index 009f2e51f40513c792ef4437f8a4ea87858d8599..4d06073f26afeb0ccc5bc94b94f0cf7c9d15d280 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright (c) 2011-present, Facebook, Inc.  All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
+//  This source code is licensed under both the GPLv2 (found in the
+//  COPYING file in the root directory) and Apache 2.0 License
+//  (found in the LICENSE.Apache file in the root directory).
 
 package org.rocksdb;
 
@@ -16,16 +16,18 @@ package org.rocksdb;
  */
 public abstract class Comparator extends AbstractComparator<Slice> {
 
-  private final long nativeHandle_;
-
   public Comparator(final ComparatorOptions copt) {
-    super();
-    this.nativeHandle_ = createNewComparator0(copt.nativeHandle_);
+    super(copt);
+  }
+
+  @Override
+  protected long initializeNative(final long... nativeParameterHandles) {
+    return createNewComparator0(nativeParameterHandles[0]);
   }
 
   @Override
-  protected final long getNativeHandle() {
-    return nativeHandle_;
+  final ComparatorType getComparatorType() {
+    return ComparatorType.JAVA_COMPARATOR;
   }
 
   private native long createNewComparator0(final long comparatorOptionsHandle);