]> git.proxmox.com Git - ceph.git/blame - ceph/src/rocksdb/java/src/main/java/org/rocksdb/RocksMemEnv.java
import 14.2.4 nautilus point release
[ceph.git] / ceph / src / rocksdb / java / src / main / java / org / rocksdb / RocksMemEnv.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/**
494da23a 9 * Memory environment.
7c673cae 10 */
494da23a 11//TODO(AR) rename to MemEnv
7c673cae
FG
12public class RocksMemEnv extends Env {
13
14 /**
494da23a 15 * <p>Creates a new environment that stores its data
7c673cae 16 * in memory and delegates all non-file-storage tasks to
494da23a
TL
17 * {@code baseEnv}.</p>
18 *
19 * <p>The caller must delete the result when it is
7c673cae
FG
20 * no longer needed.</p>
21 *
494da23a
TL
22 * @param baseEnv the base environment,
23 * must remain live while the result is in use.
24 */
25 public RocksMemEnv(final Env baseEnv) {
26 super(createMemEnv(baseEnv.nativeHandle_));
27 }
28
29 /**
30 * @deprecated Use {@link #RocksMemEnv(Env)}.
7c673cae 31 */
494da23a 32 @Deprecated
7c673cae 33 public RocksMemEnv() {
494da23a 34 this(Env.getDefault());
7c673cae
FG
35 }
36
494da23a 37 private static native long createMemEnv(final long baseEnvHandle);
7c673cae
FG
38 @Override protected final native void disposeInternal(final long handle);
39}