]> git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/java/rocksjni/cassandra_compactionfilterjni.cc
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / rocksdb / java / rocksjni / cassandra_compactionfilterjni.cc
1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under both the GPLv2 (found in the
3 // COPYING file in the root directory) and Apache 2.0 License
4 // (found in the LICENSE.Apache file in the root directory).
5
6 #include <jni.h>
7
8 #include "include/org_rocksdb_CassandraCompactionFilter.h"
9 #include "rocksjni/cplusplus_to_java_convert.h"
10 #include "utilities/cassandra/cassandra_compaction_filter.h"
11
12 /*
13 * Class: org_rocksdb_CassandraCompactionFilter
14 * Method: createNewCassandraCompactionFilter0
15 * Signature: (ZI)J
16 */
17 jlong Java_org_rocksdb_CassandraCompactionFilter_createNewCassandraCompactionFilter0(
18 JNIEnv* /*env*/, jclass /*jcls*/, jboolean purge_ttl_on_expiration,
19 jint gc_grace_period_in_seconds) {
20 auto* compaction_filter =
21 new ROCKSDB_NAMESPACE::cassandra::CassandraCompactionFilter(
22 purge_ttl_on_expiration, gc_grace_period_in_seconds);
23 // set the native handle to our native compaction filter
24 return GET_CPLUSPLUS_POINTER(compaction_filter);
25 }