public abstract class Env extends RocksObject
| Modifier and Type | Field and Description |
|---|---|
static int |
COMPACTION_POOL |
static int |
FLUSH_POOL |
nativeHandle_| Modifier | Constructor and Description |
|---|---|
protected |
Env(long nativeHandle) |
| Modifier and Type | Method and Description |
|---|---|
static Env |
getDefault()
Returns the default environment suitable for the current operating
system.
|
int |
getThreadPoolQueueLen(int poolID)
Returns the length of the queue associated with the specified
thread pool.
|
Env |
setBackgroundThreads(int num)
Sets the number of background worker threads of the flush pool
for this environment.
|
Env |
setBackgroundThreads(int num,
int poolID)
Sets the number of background worker threads of the specified thread
pool for this environment.
|
disposeInternal, disposeInternalclose, disOwnNativeHandle, isOwningHandledispose, finalizepublic static final int FLUSH_POOL
public static final int COMPACTION_POOL
public static Env getDefault()
Returns the default environment suitable for the current operating system.
The result of getDefault() is a singleton whose ownership
belongs to rocksdb c++. As a result, the returned RocksEnv will not
have the ownership of its c++ resource, and calling its dispose()
will be no-op.
RocksEnv instance.public Env setBackgroundThreads(int num)
Sets the number of background worker threads of the flush pool for this environment.
Default number: 1
num - the number of threadsRocksEnv instance.public Env setBackgroundThreads(int num, int poolID)
Sets the number of background worker threads of the specified thread pool for this environment.
num - the number of threadspoolID - the id to specified a thread pool. Should be either
FLUSH_POOL or COMPACTION_POOL.
Default number: 1
RocksEnv instance.public int getThreadPoolQueueLen(int poolID)
Returns the length of the queue associated with the specified thread pool.
poolID - the id to specified a thread pool. Should be either
FLUSH_POOL or COMPACTION_POOL.