public Long call() throws Exception { final long tx = journal.newTx(ITx.UNISOLATED);
public Long call() throws Exception { final long tx = journal.newTx(ITx.UNISOLATED);
/** * Test verifies that a transaction may start when there are (a) no commits * on the journal; and (b) no indices have been registered. * <P> * Note: The transaction will be unable to isolate an index if the index has * not been registered already by an unisolated operation. */ public void test_noIndicesRegistered() { final Journal journal = getStore(); try { journal.commit(); final long tx = journal.newTx(ITx.UNISOLATED); /* * nothing written on this transaction. */ // commit. assertEquals(0L, journal.commit(tx)); } finally { journal.destroy(); } }
/** * Test verifies that a transaction may start when there are (a) no commits * on the journal; and (b) no indices have been registered. * <P> * Note: The transaction will be unable to isolate an index if the index has * not been registered already by an unisolated operation. */ public void test_noIndicesRegistered() { final Journal journal = getStore(); try { journal.commit(); final long tx = journal.newTx(ITx.UNISOLATED); /* * nothing written on this transaction. */ // commit. assertEquals(0L, journal.commit(tx)); } finally { journal.destroy(); } }
/** * Test the index write rate for a fully isolated transaction using 32 bit * integer keys and 128 byte values for the index entries. */ public void testIsolatedIndexWriteRate() throws IOException { // register named index that can support isolation. String name = "abc"; final BTree btree; { IndexMetadata metadata = new IndexMetadata(UUID.randomUUID()); metadata.setBranchingFactor(getBranchingFactor()); metadata.setIsolatable(true); btree = BTree.create(journal, metadata); } journal.registerIndex(name, btree ); journal.commit(); // fully isolated transaction. long tx = journal.newTx(ITx.UNISOLATED); // run test. doIndexWriteRateTest(name, tx, 128); }
/** * Test the index write rate for a fully isolated transaction using 32 bit * integer keys and 128 byte values for the index entries. */ public void testIsolatedIndexWriteRate() throws IOException { // register named index that can support isolation. String name = "abc"; final BTree btree; { IndexMetadata metadata = new IndexMetadata(UUID.randomUUID()); metadata.setBranchingFactor(getBranchingFactor()); metadata.setIsolatable(true); btree = BTree.create(journal, metadata); } journal.registerIndex(name, btree ); journal.commit(); // fully isolated transaction. long tx = journal.newTx(ITx.UNISOLATED); // run test. doIndexWriteRateTest(name, tx, 128); }
final long tx = journal.newTx(ITx.UNISOLATED);
final long tx = journal.newTx(ITx.UNISOLATED);
final long tx = journal.newTx(ITx.READ_COMMITTED);
final long tx = journal.newTx(ITx.READ_COMMITTED);
final long tx0 = journal.newTx(ITx.UNISOLATED);
final long tx0 = journal.newTx(ITx.UNISOLATED);