]>
Commit | Line | Data |
---|---|---|
494da23a TL |
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 | * Persistent cache for caching IO pages on a persistent medium. The | |
10 | * cache is specifically designed for persistent read cache. | |
11 | */ | |
12 | public class PersistentCache extends RocksObject { | |
13 | ||
14 | public PersistentCache(final Env env, final String path, final long size, | |
15 | final Logger logger, final boolean optimizedForNvm) | |
16 | throws RocksDBException { | |
17 | super(newPersistentCache(env.nativeHandle_, path, size, | |
18 | logger.nativeHandle_, optimizedForNvm)); | |
19 | } | |
20 | ||
21 | private native static long newPersistentCache(final long envHandle, | |
22 | final String path, final long size, final long loggerHandle, | |
23 | final boolean optimizedForNvm) throws RocksDBException; | |
24 | ||
25 | @Override protected final native void disposeInternal(final long handle); | |
26 | } |