@Override public boolean compactionEnd() throws IOException { try { return mPageManager.compactionEnd(mCommitLock); } catch (Throwable e) { throw closeOnFailure(e); } }
@Override public boolean compactionScanFreeList() throws IOException { try { return mPageManager.compactionScanFreeList(mCommitLock); } catch (Throwable e) { throw closeOnFailure(e); } }
@Override public boolean compactionScanFreeList() throws IOException { try { return mPageManager.compactionScanFreeList(mCommitLock); } catch (Throwable e) { throw closeOnFailure(e); } }
@Override public void compactionReclaim() throws IOException { try { mPageManager.compactionReclaim(); } catch (Throwable e) { throw closeOnFailure(e); } }
@Override public void compactionReclaim() throws IOException { try { mPageManager.compactionReclaim(); } catch (Throwable e) { throw closeOnFailure(e); } }
@Override public void compactionReclaim() throws IOException { try { mPageManager.compactionReclaim(); } catch (Throwable e) { throw closeOnFailure(e); } }
@Override public boolean compactionEnd() throws IOException { try { return mPageManager.compactionEnd(mCommitLock); } catch (Throwable e) { throw closeOnFailure(e); } }
@Override public boolean compactionEnd() throws IOException { try { return mPageManager.compactionEnd(mCommitLock); } catch (Throwable e) { throw closeOnFailure(e); } }
@Override public boolean compactionScanFreeList() throws IOException { try { return mPageManager.compactionScanFreeList(mCommitLock); } catch (Throwable e) { throw closeOnFailure(e); } }
@Override public void readPage(long id, /*P*/ byte[] page) throws IOException { try { mPageArray.readPage(id, page, 0, pageSize()); } catch (Throwable e) { throw closeOnFailure(e); } }
@Override public void readPage(long id, /*P*/ byte[] page) throws IOException { try { mPageArray.readPage(id, page, 0, pageSize()); } catch (Throwable e) { throw closeOnFailure(e); } }
@Override public void readPage(long id, /*P*/ byte[] page) throws IOException { try { mPageArray.readPage(id, page, 0, pageSize()); } catch (Throwable e) { throw closeOnFailure(e); } }
@Override public long allocPage() throws IOException { CommitLock.Shared shared = mCommitLock.acquireShared(); try { return mPageManager.allocPage(); } catch (DatabaseException e) { if (e.isRecoverable()) { throw e; } throw closeOnFailure(e); } catch (Throwable e) { throw closeOnFailure(e); } finally { shared.release(); } }
@Override public boolean compactionStart(long targetPageCount) throws IOException { mCommitLock.acquireExclusive(); try { return mPageManager.compactionStart(targetPageCount); } catch (Throwable e) { throw closeOnFailure(e); } finally { mCommitLock.releaseExclusive(); } }
@Override public void readExtraCommitData(byte[] extra) throws IOException { try { mHeaderLatch.acquireShared(); try { readPartial(mCommitNumber & 1, I_EXTRA_DATA, extra, 0, extra.length); } finally { mHeaderLatch.releaseShared(); } } catch (Throwable e) { throw closeOnFailure(e); } }
@Override public void readExtraCommitData(byte[] extra) throws IOException { try { mHeaderLatch.acquireShared(); try { readPartial(mCommitNumber & 1, I_EXTRA_DATA, extra, 0, extra.length); } finally { mHeaderLatch.releaseShared(); } } catch (Throwable e) { throw closeOnFailure(e); } }
@Override public void readExtraCommitData(byte[] extra) throws IOException { try { mHeaderLatch.acquireShared(); try { readPartial(mCommitNumber & 1, I_EXTRA_DATA, extra, 0, extra.length); } finally { mHeaderLatch.releaseShared(); } } catch (Throwable e) { throw closeOnFailure(e); } }
@Override public boolean compactionStart(long targetPageCount) throws IOException { mCommitLock.acquireExclusive(); try { return mPageManager.compactionStart(targetPageCount); } catch (Throwable e) { throw closeOnFailure(e); } finally { mCommitLock.releaseExclusive(); } }
@Override public boolean compactionStart(long targetPageCount) throws IOException { mCommitLock.acquireExclusive(); try { return mPageManager.compactionStart(targetPageCount); } catch (Throwable e) { throw closeOnFailure(e); } finally { mCommitLock.releaseExclusive(); } }
@Override public void recyclePage(long id) throws IOException { checkId(id); CommitLock.Shared shared = mCommitLock.acquireShared(); try { try { mPageManager.recyclePage(id); } catch (IOException e) { mPageManager.deletePage(id, true); } } catch (Throwable e) { throw closeOnFailure(e); } finally { shared.release(); } }