@Override public IRootBlockView getRootBlockView() { return delegate.getRootBlockView(); }
@Override public IRootBlockView getRootBlockView() { return delegate.getRootBlockView(); }
/** * The description of a journal. The {@link JournalMetadata} state will not * change as writes are made on the journal since it does not reflect * anything exception the {@link UUID}, the filename, and the create time. * * @param journal * The journal. */ public JournalMetadata(final AbstractJournal journal) { this(getFileString(journal), //journal.getBufferStrategy().getExtent(), journal.getRootBlockView().getUUID(), // journal.getRootBlockView().getCreateTime(), // createTime. 0L // commitTime ); }
/** * The description of a journal. The {@link JournalMetadata} state will not * change as writes are made on the journal since it does not reflect * anything exception the {@link UUID}, the filename, and the create time. * * @param journal * The journal. */ public JournalMetadata(final AbstractJournal journal) { this(getFileString(journal), //journal.getBufferStrategy().getExtent(), journal.getRootBlockView().getUUID(), // journal.getRootBlockView().getCreateTime(), // createTime. 0L // commitTime ); }
/** * Constructor variant used to indicate a read from a specific commitTime on * a journal. * * @param journal * The journal. * @param commitTime * The commitTime. */ public JournalMetadata(final AbstractJournal journal, final long commitTime) { this(getFileString(journal), //journal.getBufferStrategy().getExtent(), journal.getRootBlockView().getUUID(),// journal.getRootBlockView().getCreateTime(),// commitTime ); }
/** * Constructor variant used to indicate a read from a specific commitTime on * a journal. * * @param journal * The journal. * @param commitTime * The commitTime. */ public JournalMetadata(final AbstractJournal journal, final long commitTime) { this(getFileString(journal), //journal.getBufferStrategy().getExtent(), journal.getRootBlockView().getUUID(),// journal.getRootBlockView().getCreateTime(),// commitTime ); }
@Override final public UUID getStoreUUID() { final L localService = getLocalService(); return localService.getRootBlockView().getUUID(); }
@Override final public long getLastCommitTime() { final L localService = getLocalService(); return localService.getRootBlockView().getLastCommitTime(); }
@Override final public long getLastCommitCounter() { final L localService = getLocalService(); return localService.getRootBlockView().getCommitCounter(); }
@Override final public UUID getStoreUUID() { final L localService = getLocalService(); return localService.getRootBlockView().getUUID(); }
@Override final public long getLastCommitTime() { final L localService = getLocalService(); return localService.getRootBlockView().getLastCommitTime(); }
@Override final public long getLastCommitCounter() { final L localService = getLocalService(); return localService.getRootBlockView().getCommitCounter(); }
/** * Write the current root block to the Journal and return its address * to be stored in the CommitRecord. */ @Override public long handleCommit(final long commitTime) { if (error != null) throw new IndexInconsistentError(error); final IRootBlockView view = journal.getRootBlockView(); final ByteBuffer rbv = view.asReadOnlyBuffer(); /* * FIXME There is an API issue with the RWStore which does not allow * us to pass in a read-only buffer. Write unit tests for this on * the core IRawStore test suite and fix the RWStore. Also write * unit tests when the array backing the ByteBuffer can be accessed * but has a non-zero array offset (a mutable slice of a ByteBuffer). */ // return journal.write(rbv); final ByteBuffer bb = ByteBuffer.allocate(rbv.capacity()); for (int i = 0; i < rbv.capacity(); i++) { bb.put(rbv.get()); } bb.flip(); return journal.write(bb); }
/** * Write the current root block to the Journal and return its address * to be stored in the CommitRecord. */ @Override public long handleCommit(final long commitTime) { if (error != null) throw new IndexInconsistentError(error); final IRootBlockView view = journal.getRootBlockView(); final ByteBuffer rbv = view.asReadOnlyBuffer(); /* * FIXME There is an API issue with the RWStore which does not allow * us to pass in a read-only buffer. Write unit tests for this on * the core IRawStore test suite and fix the RWStore. Also write * unit tests when the array backing the ByteBuffer can be accessed * but has a non-zero array offset (a mutable slice of a ByteBuffer). */ // return journal.write(rbv); final ByteBuffer bb = ByteBuffer.allocate(rbv.capacity()); for (int i = 0; i < rbv.capacity(); i++) { bb.put(rbv.get()); } bb.flip(); return journal.write(bb); }
if (getRootBlockView().getCloseTime() != 0L) {
if (getRootBlockView().getCloseTime() != 0L) {
AbstractJournal.this.getRootBlockView()); AbstractJournal.this.getRootBlockView());
AbstractJournal.this.getRootBlockView()); AbstractJournal.this.getRootBlockView());
/** * Statistics about the {@link IndexSegment}s open in the cache. * * @author <a href="mailto:thompsonbry@users.sourceforge.net">Bryan Thompson</a> */ public static class IndexSegmentStats { public long leafCount; public long leafByteCount; }
/** * Statistics about the {@link IndexSegment}s open in the cache. * * @author <a href="mailto:thompsonbry@users.sourceforge.net">Bryan Thompson</a> */ public static class IndexSegmentStats { public long leafCount; public long leafByteCount; }