@Override public boolean isEmpty() { return m_openRootBlock.getCommitCounter() == m_closeRootBlock .getCommitCounter(); }
@Override public boolean isEmpty() { return m_openRootBlock.getCommitCounter() == m_closeRootBlock .getCommitCounter(); }
/** * * @return true if the file is complete and its size indicates no content */ public boolean isEmpty() { return (m_closeRootBlock != null) && (m_openRootBlock.getCommitCounter() == m_closeRootBlock .getCommitCounter()); }
/** * * @return true if the file is complete and its size indicates no content */ public boolean isEmpty() { return (m_closeRootBlock != null) && (m_openRootBlock.getCommitCounter() == m_closeRootBlock .getCommitCounter()); }
public long getCommitCounter() { return m_openRootBlock.getCommitCounter(); }
public long getCommitCounter() { return m_openRootBlock.getCommitCounter(); }
@Override public String toString() { final IRootBlockView tmp = m_rootBlock; final long seq = m_nextSequence; return getClass().getName() + "{" + m_state == null ? "closed" : "commitCounter=" + tmp.getCommitCounter() + ",nextSequence=" + seq + "}"; }
@Override public String toString() { final IRootBlockView tmp = m_rootBlock; final long seq = m_nextSequence; return getClass().getName() + "{" + m_state == null ? "closed" : "commitCounter=" + tmp.getCommitCounter() + ",nextSequence=" + seq + "}"; }
public String toString() { final IRootBlockView tmp = HALogFile.this.getOpeningRootBlock(); final long seq = m_nextSequence; return getClass().getName() + "{" + ((!isOpen()) ? "closed" : "commitCounter=" + tmp.getCommitCounter() + ",nextSequence=" + seq) + "}"; }
@Override public long getCommitCounter() { final Lock lock = m_stateLock.readLock(); lock.lock(); try { assertOpen(); return m_rootBlock.getCommitCounter(); } finally { lock.unlock(); } }
@Override public void sample() { final AbstractJournal jnl = ref.get(); if (jnl != null) { final IRootBlockView rootBlock = jnl._rootBlock; if (rootBlock != null) { setValue(rootBlock.getCommitCounter()); } } } });
@Override public File getSnapshotFile(final IRootBlockView rbv) throws IOException { return File.createTempFile( testName + "-snapshot-" + rbv.getCommitCounter(), getCompress() ? "jnl.gz" : ".jnl"); }
@Override public File getSnapshotFile(final IRootBlockView rbv) throws IOException { return File.createTempFile( testName + "-snapshot-" + rbv.getCommitCounter(), getCompress() ? "jnl.gz" : ".jnl"); }
@Override public long getCommitCounter() { final Lock lock = m_stateLock.readLock(); lock.lock(); try { assertOpen(); return m_rootBlock.getCommitCounter(); } finally { lock.unlock(); } }
public String toString() { final IRootBlockView tmp = HALogFile.this.getOpeningRootBlock(); final long seq = m_nextSequence; return getClass().getName() + "{" + ((!isOpen()) ? "closed" : "commitCounter=" + tmp.getCommitCounter() + ",nextSequence=" + seq) + "}"; }
@Override public void sample() { final AbstractJournal jnl = ref.get(); if (jnl != null) { final IRootBlockView rootBlock = jnl._rootBlock; if (rootBlock != null) { setValue(rootBlock.getCommitCounter()); } } } });
public HALogFile createLog(final IRootBlockView rbv) throws IOException { if (haLog.isInfoEnabled()) haLog.info("Creating log for commit " + rbv.getCommitCounter()); m_currentLock.lock(); try { if (m_current != null) throw new IllegalStateException(); final HALogFile ret = new HALogFile(rbv, m_callback); m_current = ret; return ret; } finally { m_currentLock.unlock(); } }
public HALogFile createLog(final IRootBlockView rbv) throws IOException { if (haLog.isInfoEnabled()) haLog.info("Creating log for commit " + rbv.getCommitCounter()); m_currentLock.lock(); try { if (m_current != null) throw new IllegalStateException(); final HALogFile ret = new HALogFile(rbv, m_callback); m_current = ret; return ret; } finally { m_currentLock.unlock(); } }
@Override final public long getLastCommitCounter() { final L localService = getLocalService(); return localService.getRootBlockView().getCommitCounter(); }
@Override final public long getLastCommitCounter() { final L localService = getLocalService(); return localService.getRootBlockView().getCommitCounter(); }