]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/java/rocksjni/restorejni.cc
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.
6 // This file implements the "bridge" between Java and C++ and enables
7 // calling c++ rocksdb::RestoreBackupableDB and rocksdb::RestoreOptions methods
15 #include "include/org_rocksdb_RestoreOptions.h"
16 #include "rocksjni/portal.h"
17 #include "rocksdb/utilities/backupable_db.h"
19 * Class: org_rocksdb_RestoreOptions
20 * Method: newRestoreOptions
23 jlong
Java_org_rocksdb_RestoreOptions_newRestoreOptions(JNIEnv
* env
,
24 jclass jcls
, jboolean keep_log_files
) {
25 auto* ropt
= new rocksdb::RestoreOptions(keep_log_files
);
26 return reinterpret_cast<jlong
>(ropt
);
30 * Class: org_rocksdb_RestoreOptions
31 * Method: disposeInternal
34 void Java_org_rocksdb_RestoreOptions_disposeInternal(JNIEnv
* env
, jobject jobj
,
36 auto* ropt
= reinterpret_cast<rocksdb::RestoreOptions
*>(jhandle
);