]> git.proxmox.com Git - ceph.git/blame - ceph/src/rocksdb/java/src/main/java/org/rocksdb/Filter.java
update ceph source to reef 18.1.2
[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 */
494da23a 15//TODO(AR) should be renamed FilterPolicy
7c673cae
FG
16public abstract class Filter extends RocksObject {
17
18 protected Filter(final long nativeHandle) {
19 super(nativeHandle);
20 }
21
22 /**
23 * Deletes underlying C++ filter pointer.
24 *
25 * Note that this function should be called only after all
26 * RocksDB instances referencing the filter are closed.
27 * Otherwise an undefined behavior will occur.
28 */
29 @Override
30 protected void disposeInternal() {
31 disposeInternal(nativeHandle_);
32 }
33
34 @Override
35 protected final native void disposeInternal(final long handle);
36}