]> git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/java/rocksjni/cassandra_compactionfilterjni.cc
update sources to ceph Nautilus 14.2.1
[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 "utilities/cassandra/cassandra_compaction_filter.h"
10
11 /*
12 * Class: org_rocksdb_CassandraCompactionFilter
13 * Method: createNewCassandraCompactionFilter0
14 * Signature: (ZI)J
15 */
16 jlong Java_org_rocksdb_CassandraCompactionFilter_createNewCassandraCompactionFilter0(
17 JNIEnv* /*env*/, jclass /*jcls*/, jboolean purge_ttl_on_expiration,
18 jint gc_grace_period_in_seconds) {
19 auto* compaction_filter = new rocksdb::cassandra::CassandraCompactionFilter(
20 purge_ttl_on_expiration, gc_grace_period_in_seconds);
21 // set the native handle to our native compaction filter
22 return reinterpret_cast<jlong>(compaction_filter);
23 }