1 // Copyright (c) 2017-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 package org.rocksdb; 7 8 /** 9 * CassandraValueMergeOperator is a merge operator that merges two cassandra wide column 10 * values. 11 */ 12 public class CassandraValueMergeOperator extends MergeOperator { CassandraValueMergeOperator(int gcGracePeriodInSeconds)13 public CassandraValueMergeOperator(int gcGracePeriodInSeconds) { 14 super(newSharedCassandraValueMergeOperator(gcGracePeriodInSeconds, 0)); 15 } 16 CassandraValueMergeOperator(int gcGracePeriodInSeconds, int operandsLimit)17 public CassandraValueMergeOperator(int gcGracePeriodInSeconds, int operandsLimit) { 18 super(newSharedCassandraValueMergeOperator(gcGracePeriodInSeconds, operandsLimit)); 19 } 20 newSharedCassandraValueMergeOperator( int gcGracePeriodInSeconds, int limit)21 private native static long newSharedCassandraValueMergeOperator( 22 int gcGracePeriodInSeconds, int limit); 23 disposeInternal(final long handle)24 @Override protected final native void disposeInternal(final long handle); 25 } 26