]> git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/java/rocksjni/table_filter_jnicallback.h
import 14.2.4 nautilus point release
[ceph.git] / ceph / src / rocksdb / java / rocksjni / table_filter_jnicallback.h
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).
5 //
6 // This file implements the callback "bridge" between Java and C++ for
7 // rocksdb::TableFilter.
8
9 #ifndef JAVA_ROCKSJNI_TABLE_FILTER_JNICALLBACK_H_
10 #define JAVA_ROCKSJNI_TABLE_FILTER_JNICALLBACK_H_
11
12 #include <jni.h>
13 #include <functional>
14 #include <memory>
15
16 #include "rocksdb/table_properties.h"
17 #include "rocksjni/jnicallback.h"
18
19 namespace rocksdb {
20
21 class TableFilterJniCallback : public JniCallback {
22 public:
23 TableFilterJniCallback(
24 JNIEnv* env, jobject jtable_filter);
25 std::function<bool(const rocksdb::TableProperties&)> GetTableFilterFunction();
26
27 private:
28 jmethodID m_jfilter_methodid;
29 std::function<bool(const rocksdb::TableProperties&)> m_table_filter_function;
30 };
31
32 } //namespace rocksdb
33
34 #endif // JAVA_ROCKSJNI_TABLE_FILTER_JNICALLBACK_H_