]>
Commit | Line | Data |
---|---|---|
f67539c2 | 1 | // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. |
7c673cae | 2 | // Copyright (c) 2014, Vlad Balan (vlad.gm@gmail.com). All rights reserved. |
11fdf7f2 TL |
3 | // This source code is licensed under both the GPLv2 (found in the |
4 | // COPYING file in the root directory) and Apache 2.0 License | |
5 | // (found in the LICENSE.Apache file in the root directory). | |
7c673cae FG |
6 | |
7 | package org.rocksdb; | |
8 | ||
9 | /** | |
10 | * StringAppendOperator is a merge operator that concatenates | |
11 | * two strings. | |
12 | */ | |
13 | public class StringAppendOperator extends MergeOperator { | |
14 | public StringAppendOperator() { | |
11fdf7f2 | 15 | this(','); |
7c673cae FG |
16 | } |
17 | ||
11fdf7f2 TL |
18 | public StringAppendOperator(char delim) { |
19 | super(newSharedStringAppendOperator(delim)); | |
20 | } | |
21 | ||
1e59de90 TL |
22 | public StringAppendOperator(String delim) { |
23 | super(newSharedStringAppendOperator(delim)); | |
24 | } | |
25 | ||
11fdf7f2 | 26 | private native static long newSharedStringAppendOperator(final char delim); |
1e59de90 | 27 | private native static long newSharedStringAppendOperator(final String delim); |
7c673cae FG |
28 | @Override protected final native void disposeInternal(final long handle); |
29 | } |