mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Add bloom filters
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "rocksdb/memtablerep.h"
|
||||
#include "rocksdb/table.h"
|
||||
#include "rocksdb/slice_transform.h"
|
||||
#include "rocksdb/filter_policy.h"
|
||||
|
||||
/*
|
||||
* Class: org_rocksdb_Options
|
||||
@@ -119,6 +120,23 @@ jlong Java_org_rocksdb_Options_statisticsPtr(
|
||||
return reinterpret_cast<jlong>(st);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_rocksdb_Options
|
||||
* Method: createBloomFilter0
|
||||
* Signature: (JI)V
|
||||
*/
|
||||
void Java_org_rocksdb_Options_createBloomFilter0(
|
||||
JNIEnv* env, jobject jobj, jlong jhandle, jint jbits_per_key) {
|
||||
rocksdb::Options* opt = reinterpret_cast<rocksdb::Options*>(jhandle);
|
||||
|
||||
// Delete previously allocated pointer
|
||||
if(opt->filter_policy) {
|
||||
delete opt->filter_policy;
|
||||
}
|
||||
|
||||
opt->filter_policy = rocksdb::NewBloomFilterPolicy(jbits_per_key);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_rocksdb_Options
|
||||
* Method: maxWriteBufferNumber
|
||||
|
||||
Reference in New Issue
Block a user