Package org.rocksdb

Examples of org.rocksdb.RocksEnv


  public static final RocksMemoryResource rocksMemoryResource =
      new RocksMemoryResource();

  @Test
  public void rocksEnv(){
    RocksEnv rocksEnv = RocksEnv.getDefault();
    rocksEnv.setBackgroundThreads(5);
    // default rocksenv will always return zero for flush pool
    // no matter what was set via setBackgroundThreads
    assertThat(rocksEnv.getThreadPoolQueueLen(RocksEnv.FLUSH_POOL)).
        isEqualTo(0);
    rocksEnv.setBackgroundThreads(5, RocksEnv.FLUSH_POOL);
    // default rocksenv will always return zero for flush pool
    // no matter what was set via setBackgroundThreads
    assertThat(rocksEnv.getThreadPoolQueueLen(RocksEnv.FLUSH_POOL)).
        isEqualTo(0);
    rocksEnv.setBackgroundThreads(5, RocksEnv.COMPACTION_POOL);
    // default rocksenv will always return zero for compaction pool
    // no matter what was set via setBackgroundThreads
    assertThat(rocksEnv.getThreadPoolQueueLen(RocksEnv.COMPACTION_POOL)).
        isEqualTo(0);
  }
View Full Code Here

TOP

Related Classes of org.rocksdb.RocksEnv

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.