@Override public ByteBuffer read(final long addr) { assertOpen(); assertCanRead(); return _bufferStrategy.read(addr); }
@Override public ByteBuffer read(final long addr) { assertOpen(); assertCanRead(); return _bufferStrategy.read(addr); }
/** * Return the commit record, either new or read from the root block. */ private ICommitRecord _getCommitRecord() { assert _fieldReadWriteLock.writeLock().isHeldByCurrentThread(); // the address of the current commit record from the root block. final long commitRecordAddr = _rootBlock.getCommitRecordAddr(); if (log.isInfoEnabled()) log.info("Reading commit record from: " + commitRecordAddr); if (commitRecordAddr == NULL) { // No commit record on the store yet. return new CommitRecord(); } else { // Read the commit record from the store. return CommitRecordSerializer.INSTANCE.deserialize(_bufferStrategy .read(commitRecordAddr)); } }
/** * Return the commit record, either new or read from the root block. */ private ICommitRecord _getCommitRecord() { assert _fieldReadWriteLock.writeLock().isHeldByCurrentThread(); // the address of the current commit record from the root block. final long commitRecordAddr = _rootBlock.getCommitRecordAddr(); if (log.isInfoEnabled()) log.info("Reading commit record from: " + commitRecordAddr); if (commitRecordAddr == NULL) { // No commit record on the store yet. return new CommitRecord(); } else { // Read the commit record from the store. return CommitRecordSerializer.INSTANCE.deserialize(_bufferStrategy .read(commitRecordAddr)); } }