/** * If fragmented trash exists, non-transactionally delete all fragmented values. Expected * to be called only during recovery or replication leader switch. */ private void emptyAllFragmentedTrash(boolean checkpoint) throws IOException { _FragmentedTrash trash = mFragmentedTrash; if (trash != null && trash.emptyAllTrash(mEventListener) && checkpoint) { checkpoint(false, 0, 0); } }
/** * If fragmented trash exists, non-transactionally delete all fragmented values. Expected * to be called only during recovery or replication leader switch. */ void emptyAllFragmentedTrash(boolean checkpoint) throws IOException { _FragmentedTrash trash = mFragmentedTrash; if (trash != null && trash.emptyAllTrash(mEventListener) && checkpoint) { checkpoint(false, 0, 0); } }
/** * If fragmented trash exists, non-transactionally delete all fragmented values. Expected * to be called only during recovery or replication leader switch. */ private void emptyAllFragmentedTrash(boolean checkpoint) throws IOException { _FragmentedTrash trash = mFragmentedTrash; if (trash != null && trash.emptyAllTrash(mEventListener) && checkpoint) { checkpoint(false, 0, 0); } }
@Override public void checkpoint() throws IOException { if (!mClosed && mPageDb.isDurable()) { try { checkpoint(false, 0, 0); } catch (Throwable e) { DatabaseException.rethrowIfRecoverable(e); closeQuietly(null, this, e); throw e; } } }
@Override public void checkpoint() throws IOException { while (!isClosed() && mPageDb.isDurable()) { try { checkpoint(false, 0, 0); return; } catch (UnmodifiableReplicaException e) { // Retry. Thread.yield(); } catch (Throwable e) { DatabaseException.rethrowIfRecoverable(e); closeQuietly(this, e); throw e; } } }
@Override public void checkpoint() throws IOException { while (!isClosed() && mPageDb.isDurable()) { try { checkpoint(false, 0, 0); return; } catch (UnmodifiableReplicaException e) { // Retry. Thread.yield(); } catch (Throwable e) { DatabaseException.rethrowIfRecoverable(e); closeQuietly(null, this, e); throw e; } } }
checkpoint(); }); checkpoint(true, 0, 0); checkpoint(true, 0, 0); checkpoint(true, 0, 0); mPageDb.compactionReclaim(); checkpoint(true, 0, 0);
checkpoint(); }); checkpoint(true, 0, 0); checkpoint(true, 0, 0); checkpoint(true, 0, 0); mPageDb.compactionReclaim(); checkpoint(true, 0, 0);
checkpoint(); }); checkpoint(true, 0, 0); checkpoint(true, 0, 0); checkpoint(true, 0, 0); mPageDb.compactionReclaim(); checkpoint(true, 0, 0);
@Override public long preallocate(long bytes) throws IOException { if (!mClosed && mPageDb.isDurable()) { int pageSize = mPageSize; long pageCount = (bytes + pageSize - 1) / pageSize; if (pageCount > 0) { pageCount = mPageDb.allocatePages(pageCount); if (pageCount > 0) { try { checkpoint(true, 0, 0); } catch (Throwable e) { DatabaseException.rethrowIfRecoverable(e); closeQuietly(null, this, e); throw e; } } return pageCount * pageSize; } } return 0; }
@Override public long preallocate(long bytes) throws IOException { if (!isClosed() && mPageDb.isDurable()) { int pageSize = mPageSize; long pageCount = (bytes + pageSize - 1) / pageSize; if (pageCount > 0) { pageCount = mPageDb.allocatePages(pageCount); if (pageCount > 0) { try { checkpoint(true, 0, 0); } catch (Throwable e) { DatabaseException.rethrowIfRecoverable(e); closeQuietly(null, this, e); throw e; } } return pageCount * pageSize; } } return 0; }
@Override public long preallocate(long bytes) throws IOException { if (!isClosed() && mPageDb.isDurable()) { int pageSize = mPageSize; long pageCount = (bytes + pageSize - 1) / pageSize; if (pageCount > 0) { pageCount = mPageDb.allocatePages(pageCount); if (pageCount > 0) { try { checkpoint(true, 0, 0); } catch (Throwable e) { DatabaseException.rethrowIfRecoverable(e); closeQuietly(this, e); throw e; } } return pageCount * pageSize; } } return 0; }
checkpoint(true, 0, 0); if (c != null) { ct = c.close(cause);
mCheckpointLock.lock(); lockedCheckpointer = true; checkpoint(true, 0, 0); if (c != null) { ct = c.close(cause);
mCheckpointLock.lock(); lockedCheckpointer = true; checkpoint(true, 0, 0); if (c != null) { c.close(cause);