]> git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/java/src/main/java/org/rocksdb/CompactionOptionsFIFO.java
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / rocksdb / java / src / main / java / org / rocksdb / CompactionOptionsFIFO.java
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 package org.rocksdb;
7
8 /**
9 * Options for FIFO Compaction
10 */
11 public class CompactionOptionsFIFO extends RocksObject {
12
13 public CompactionOptionsFIFO() {
14 super(newCompactionOptionsFIFO());
15 }
16
17 /**
18 * Once the total sum of table files reaches this, we will delete the oldest
19 * table file
20 *
21 * Default: 1GB
22 *
23 * @param maxTableFilesSize The maximum size of the table files
24 *
25 * @return the reference to the current options.
26 */
27 public CompactionOptionsFIFO setMaxTableFilesSize(
28 final long maxTableFilesSize) {
29 setMaxTableFilesSize(nativeHandle_, maxTableFilesSize);
30 return this;
31 }
32
33 /**
34 * Once the total sum of table files reaches this, we will delete the oldest
35 * table file
36 *
37 * Default: 1GB
38 *
39 * @return max table file size in bytes
40 */
41 public long maxTableFilesSize() {
42 return maxTableFilesSize(nativeHandle_);
43 }
44
45 private native void setMaxTableFilesSize(long handle, long maxTableFilesSize);
46 private native long maxTableFilesSize(long handle);
47
48 private native static long newCompactionOptionsFIFO();
49 @Override protected final native void disposeInternal(final long handle);
50 }