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).
8 #include "include/org_rocksdb_CassandraCompactionFilter.h"
9 #include "utilities/cassandra/cassandra_compaction_filter.h"
12 * Class: org_rocksdb_CassandraCompactionFilter
13 * Method: createNewCassandraCompactionFilter0
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
);