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 * <p>A RocksEnv is an interface used by the rocksdb implementation to access 10 * operating system functionality like the filesystem etc.</p> 11 * 12 * <p>All Env implementations are safe for concurrent access from 13 * multiple threads without any external synchronization.</p> 14 */ 15 public class RocksEnv extends Env { 16 17 /** 18 * <p>Package-private constructor that uses the specified native handle 19 * to construct a RocksEnv.</p> 20 * 21 * <p>Note that the ownership of the input handle 22 * belongs to the caller, and the newly created RocksEnv will not take 23 * the ownership of the input handle. As a result, calling 24 * {@code dispose()} of the created RocksEnv will be no-op.</p> 25 */ RocksEnv(final long handle)26 RocksEnv(final long handle) { 27 super(handle); 28 } 29 30 @Override disposeInternal(final long handle)31 protected native final void disposeInternal(final long handle); 32 } 33