@Test public void testOpenAndClose() throws Exception { byte[] keyBytes = randomBytes(16); File file = new File(folder.getRoot(), UUID.randomUUID().toString()); for (int i = 0; i < 3; i++) { Database db = Database.build(file, keyBytes, null, null); boolean uniqueKeys = true; Btree btree = new Btree(db, uniqueKeys); if (i == 0) { simplePut(btree, 100); } simpleRead(btree, 100); System.out.println(btree.getDb().getPageStore().debugDump()); System.out.flush(); Assert.assertTrue(btree.getDb().getPageStore().debugIsIdle().or(true)); db.close(); } }
public Database getDb() { return db; }
Btree { public Database getDb() { return db; } }
Btree { public Database getDb() { return db; } Btree(Database db, boolean uniqueKeys); }
Btree { public Database getDb() { return db; } Btree(Database db, boolean uniqueKeys); WriteTransaction beginReadWrite(); ReadOnlyTransaction beginReadOnly(); boolean isUniqueKeys(); Database getDb(); String writeSnapshot(ReadOnlyTransaction txn, SnapshotStorage snapshotDest); }
Btree { public Database getDb() { return db; } Btree(Database db, boolean uniqueKeys); WriteTransaction beginReadWrite(); ReadOnlyTransaction beginReadOnly(); boolean isUniqueKeys(); Database getDb(); String writeSnapshot(ReadOnlyTransaction txn, SnapshotStorage snapshotDest);  }