/** * Note: This will only succeed if the <i>uuid</i> identifies <i>this</i> * journal. */ public IRawStore openStore(final UUID uuid) { if(uuid == getRootBlockView().getUUID()) { return this; } throw new UnsupportedOperationException(); }
/** * The last commit time from the current root block. */ @Override final public long getLastCommitTime() { return journal.getRootBlockView().getLastCommitTime(); }
/** * The last commit time from the current root block. */ @Override final public long getLastCommitTime() { return journal.getRootBlockView().getLastCommitTime(); }
/** * Note: This will only succeed if the <i>uuid</i> identifies <i>this</i> * journal. */ public IRawStore openStore(final UUID uuid) { if(uuid == getRootBlockView().getUUID()) { return this; } throw new UnsupportedOperationException(); }
&& ((Journal) store).getRootBlockView().getCloseTime() != 0L) {
final boolean isRootBlock0 = journal.getRootBlockView() .isRootBlock0(); log.info("After commit =" + journal.getRootBlockView()); assertNotSame(isRootBlock0, journal.getRootBlockView() .isRootBlock0()); log.info("After rollback =" + journal.getRootBlockView());
&& ((Journal) store).getRootBlockView().getCloseTime() != 0L) {
final boolean isRootBlock0 = journal.getRootBlockView() .isRootBlock0(); log.info("After commit =" + journal.getRootBlockView()); assertNotSame(isRootBlock0, journal.getRootBlockView() .isRootBlock0()); log.info("After rollback =" + journal.getRootBlockView());
System.err.println("createTime="+journal.getRootBlockView().getCreateTime()); System.err.println("lastCommitTime="+journal.getLastCommitTime());
System.err.println("createTime="+journal.getRootBlockView().getCreateTime()); System.err.println("lastCommitTime="+journal.getLastCommitTime());
public void test_multiVoidCommit() { final Journal store = (Journal) getStore(); try { final RWStrategy bs = (RWStrategy) store.getBufferStrategy(); final RWStore rw = bs.getStore(); final boolean initRequire = bs.requiresCommit(store.getRootBlockView()); assertTrue(initRequire); for (int n = 0; n < 20; n++) { store.commit(); final IRootBlockView rbv = store.getRootBlockView(); assertTrue(1 == rbv.getCommitCounter()); assertFalse(bs.requiresCommit(store.getRootBlockView())); assertFalse(rw.requiresCommit()); } } finally { store.destroy(); } }
final long commitCounterBefore = journal.getRootBlockView() .getCommitCounter(); journal.getRootBlockView().getCommitCounter());
final long commitCounterBefore = journal.getRootBlockView() .getCommitCounter(); journal.getRootBlockView().getCommitCounter());
public void test_multiVoidCommit() { final Journal store = (Journal) getStore(); try { final RWStrategy bs = (RWStrategy) store.getBufferStrategy(); final RWStore rw = bs.getStore(); final boolean initRequire = bs.requiresCommit(store.getRootBlockView()); assertTrue(initRequire); for (int n = 0; n < 20; n++) { store.commit(); final IRootBlockView rbv = store.getRootBlockView(); assertTrue(1 == rbv.getCommitCounter()); assertFalse(bs.requiresCommit(store.getRootBlockView())); assertFalse(rw.requiresCommit()); } } finally { store.destroy(); } }
final long commitCounterBefore = journal.getRootBlockView() .getCommitCounter(); journal.getRootBlockView().getCommitCounter());
+ ",effectiveReleaseTimeForHA=" + ",rootBlock=" + getRootBlockView() // + ",req=" + req// );
+ ",effectiveReleaseTimeForHA=" + ",rootBlock=" + getRootBlockView() // + ",req=" + req// );
final long beginCommitCounter = journal.getRootBlockView().getCommitCounter(); assertEquals(beginCommitCounter,journal.getRootBlockView().getCommitCounter());
rw.resetFromHARootBlock(store.getRootBlockView());
rw.resetFromHARootBlock(store.getRootBlockView());