Summary: probably something changed, maybe https://github.com/facebook/rocksdb/issues/14311 Full command: ``` git ls-files '*.cc' '*.h' | grep -v '^third-party/' | grep -v 'range_tree' | xargs clang-format -i ``` Pull Request resolved: https://github.com/facebook/rocksdb/pull/14331 Test Plan: CI Reviewed By: mszeszko-meta Differential Revision: D93246992 Pulled By: pdillinger fbshipit-source-id: 6bc5b97978fef8aee52823dadb6daa4bea57343d
39 lines
1.5 KiB
C++
39 lines
1.5 KiB
C++
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
//
|
|
// 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).
|
|
|
|
#include "java/rocksjni/table_properties_collector_factory.h"
|
|
|
|
#include "java/include/org_rocksdb_TablePropertiesCollectorFactory.h"
|
|
#include "java/rocksjni/cplusplus_to_java_convert.h"
|
|
#include "rocksdb/db.h"
|
|
#include "rocksdb/utilities/table_properties_collectors.h"
|
|
|
|
/*
|
|
* Class: org_rocksdb_TablePropertiesCollectorFactory
|
|
* Method: newCompactOnDeletionCollectorFactory
|
|
* Signature: (JJD)J
|
|
*/
|
|
jlong Java_org_rocksdb_TablePropertiesCollectorFactory_newCompactOnDeletionCollectorFactory(
|
|
JNIEnv*, jclass, jlong sliding_window_size, jlong deletion_trigger,
|
|
jdouble deletion_ratio) {
|
|
auto* wrapper = new TablePropertiesCollectorFactoriesJniWrapper();
|
|
wrapper->table_properties_collector_factories =
|
|
ROCKSDB_NAMESPACE::NewCompactOnDeletionCollectorFactory(
|
|
sliding_window_size, deletion_trigger, deletion_ratio);
|
|
return GET_CPLUSPLUS_POINTER(wrapper);
|
|
}
|
|
|
|
/*
|
|
* Class: org_rocksdb_TablePropertiesCollectorFactory
|
|
* Method: deleteCompactOnDeletionCollectorFactory
|
|
* Signature: (J)J
|
|
*/
|
|
void Java_org_rocksdb_TablePropertiesCollectorFactory_deleteCompactOnDeletionCollectorFactory(
|
|
JNIEnv*, jclass, jlong jhandle) {
|
|
auto instance =
|
|
reinterpret_cast<TablePropertiesCollectorFactoriesJniWrapper*>(jhandle);
|
|
delete instance;
|
|
}
|