]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/java/src/main/java/org/rocksdb/SkipListMemTableConfig.java
1 // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
5 * The config for skip-list memtable representation.
7 public class SkipListMemTableConfig
extends MemTableConfig
{
9 public static final long DEFAULT_LOOKAHEAD
= 0;
12 * SkipListMemTableConfig constructor
14 public SkipListMemTableConfig() {
15 lookahead_
= DEFAULT_LOOKAHEAD
;
19 * Sets lookahead for SkipList
21 * @param lookahead If non-zero, each iterator's seek operation
22 * will start the search from the previously visited record
23 * (doing at most 'lookahead' steps). This is an
24 * optimization for the access pattern including many
25 * seeks with consecutive keys.
26 * @return the current instance of SkipListMemTableConfig
28 public SkipListMemTableConfig
setLookahead(final long lookahead
) {
29 lookahead_
= lookahead
;
34 * Returns the currently set lookahead value.
36 * @return lookahead value
38 public long lookahead() {
43 @Override protected long newMemTableFactoryHandle() {
44 return newMemTableFactoryHandle0(lookahead_
);
47 private native long newMemTableFactoryHandle0(long lookahead
)
48 throws IllegalArgumentException
;
50 private long lookahead_
;