Package org.rocksdb

Examples of org.rocksdb.ReadOptions


    readOptions.setTailing(true);
  }

  @Test
  public void failTailingUninitialized(){
    ReadOptions readOptions = setupUninitializedReadOptions(
        exception);
    readOptions.tailing();
  }
View Full Code Here


    readOptions.tailing();
  }

  @Test
  public void failSetSnapshotUninitialized(){
    ReadOptions readOptions = setupUninitializedReadOptions(
        exception);
    readOptions.setSnapshot(null);
  }
View Full Code Here

    readOptions.setSnapshot(null);
  }

  @Test
  public void failSnapshotUninitialized(){
    ReadOptions readOptions = setupUninitializedReadOptions(
        exception);
    readOptions.snapshot();
  }
View Full Code Here

    readOptions.snapshot();
  }

  private ReadOptions setupUninitializedReadOptions(
      ExpectedException exception) {
    ReadOptions readOptions = new ReadOptions();
    readOptions.dispose();
    exception.expect(AssertionError.class);
    return readOptions;
  }
View Full Code Here

public class ReadOptionsTest {
  static {
    RocksDB.loadLibrary();
  }
  public static void main(String[] args) {
    ReadOptions opt = new ReadOptions();
    Random rand = new Random();
    { // VerifyChecksums test
      boolean boolValue = rand.nextBoolean();
      opt.setVerifyChecksums(boolValue);
      assert(opt.verifyChecksums() == boolValue);
    }

    { // FillCache test
      boolean boolValue = rand.nextBoolean();
      opt.setFillCache(boolValue);
      assert(opt.fillCache() == boolValue);
    }

    { // Tailing test
      boolean boolValue = rand.nextBoolean();
      opt.setTailing(boolValue);
      assert(opt.tailing() == boolValue);
    }

    opt.dispose();
    System.out.println("Passed ReadOptionsTest");
  }
View Full Code Here

TOP

Related Classes of org.rocksdb.ReadOptions

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.