]>
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 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).
6 // This file implements the "bridge" between Java and C++ and enables
7 // calling C++ ROCKSDB_NAMESPACE::RestoreOptions methods
16 #include "include/org_rocksdb_RestoreOptions.h"
17 #include "rocksdb/utilities/backup_engine.h"
18 #include "rocksjni/cplusplus_to_java_convert.h"
19 #include "rocksjni/portal.h"
21 * Class: org_rocksdb_RestoreOptions
22 * Method: newRestoreOptions
25 jlong
Java_org_rocksdb_RestoreOptions_newRestoreOptions(
26 JNIEnv
* /*env*/, jclass
/*jcls*/, jboolean keep_log_files
) {
27 auto* ropt
= new ROCKSDB_NAMESPACE::RestoreOptions(keep_log_files
);
28 return GET_CPLUSPLUS_POINTER(ropt
);
32 * Class: org_rocksdb_RestoreOptions
33 * Method: disposeInternal
36 void Java_org_rocksdb_RestoreOptions_disposeInternal(JNIEnv
* /*env*/,
39 auto* ropt
= reinterpret_cast<ROCKSDB_NAMESPACE::RestoreOptions
*>(jhandle
);