]> git.proxmox.com Git - ceph.git/blame - ceph/src/rocksdb/java/src/main/java/org/rocksdb/Filter.java
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / rocksdb / java / src / main / java / org / rocksdb / Filter.java
CommitLineData
7c673cae 1// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
11fdf7f2
TL
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).
7c673cae
FG
5
6package org.rocksdb;
7
8/**
9 * Filters are stored in rocksdb and are consulted automatically
10 * by rocksdb to decide whether or not to read some
11 * information from disk. In many cases, a filter can cut down the
12 * number of disk seeks form a handful to a single disk seek per
13 * DB::Get() call.
14 */
15public abstract class Filter extends RocksObject {
16
17 protected Filter(final long nativeHandle) {
18 super(nativeHandle);
19 }
20
21 /**
22 * Deletes underlying C++ filter pointer.
23 *
24 * Note that this function should be called only after all
25 * RocksDB instances referencing the filter are closed.
26 * Otherwise an undefined behavior will occur.
27 */
28 @Override
29 protected void disposeInternal() {
30 disposeInternal(nativeHandle_);
31 }
32
33 @Override
34 protected final native void disposeInternal(final long handle);
35}