提交 89cb481a 编写于 作者: A Ankit Gupta

Fix doc

上级 677b0d6d
......@@ -3,7 +3,8 @@
// 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 file implements the "bridge" between Java and C++ for rocksdb::Filter.
// This file implements the "bridge" between Java and C++ for
// rocksdb::FilterPolicy.
#include <stdio.h>
#include <stdlib.h>
......
......@@ -285,7 +285,7 @@ class IteratorJni {
class FilterJni {
public:
// Get the java class id of org.rocksdb.Filter.
// Get the java class id of org.rocksdb.FilterPolicy.
static jclass getJClass(JNIEnv* env) {
static jclass jclazz = env->FindClass("org/rocksdb/Filter");
assert(jclazz != nullptr);
......@@ -293,7 +293,7 @@ class FilterJni {
}
// Get the field id of the member variable of org.rocksdb.Filter
// that stores the pointer to rocksdb::Iterator.
// that stores the pointer to rocksdb::FilterPolicy.
static jfieldID getHandleFieldID(JNIEnv* env) {
static jfieldID fid = env->GetFieldID(
getJClass(env), "nativeHandle_", "J");
......@@ -301,13 +301,13 @@ class FilterJni {
return fid;
}
// Get the pointer to rocksdb::Filter.
// Get the pointer to rocksdb::FilterPolicy.
static rocksdb::FilterPolicy* getHandle(JNIEnv* env, jobject jobj) {
return reinterpret_cast<rocksdb::FilterPolicy*>(
env->GetLongField(jobj, getHandleFieldID(env)));
}
// Pass the rocksdb::Filter pointer to the java side.
// Pass the rocksdb::FilterPolicy pointer to the java side.
static void setHandle(
JNIEnv* env, jobject jobj, const rocksdb::FilterPolicy* op) {
env->SetLongField(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册