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 "rocksjni/cplusplus_to_java_convert.h"
10 #include "utilities/cassandra/cassandra_compaction_filter.h"
13 * Class: org_rocksdb_CassandraCompactionFilter
14 * Method: createNewCassandraCompactionFilter0
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
);