Fix doc
This commit is contained in:
parent
677b0d6d3f
commit
89cb481aa1
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user