rocksdb/java/rocksjni/table_filter_jnicallback.h
Adam Retter bb474e9a02 Add missing functionality to RocksJava (#4833)
Summary:
This is my latest round of changes to add missing items to RocksJava. More to come in future PRs.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/4833

Differential Revision: D14152266

Pulled By: sagar0

fbshipit-source-id: d6cff67e26da06c131491b5cf6911a8cd0db0775
2019-02-22 14:46:46 -08:00

35 lines
1.0 KiB
C++

// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
// 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).
//
// This file implements the callback "bridge" between Java and C++ for
// rocksdb::TableFilter.
#ifndef JAVA_ROCKSJNI_TABLE_FILTER_JNICALLBACK_H_
#define JAVA_ROCKSJNI_TABLE_FILTER_JNICALLBACK_H_
#include <jni.h>
#include <functional>
#include <memory>
#include "rocksdb/table_properties.h"
#include "rocksjni/jnicallback.h"
namespace rocksdb {
class TableFilterJniCallback : public JniCallback {
public:
TableFilterJniCallback(
JNIEnv* env, jobject jtable_filter);
std::function<bool(const rocksdb::TableProperties&)> GetTableFilterFunction();
private:
jmethodID m_jfilter_methodid;
std::function<bool(const rocksdb::TableProperties&)> m_table_filter_function;
};
} //namespace rocksdb
#endif // JAVA_ROCKSJNI_TABLE_FILTER_JNICALLBACK_H_