@Override public Tree newTemporaryIndex() throws IOException { CommitLock.Shared shared = mCommitLock.acquireShared(); try { return newTemporaryTree(null); } finally { shared.release(); } }
@Override public Tree newTemporaryIndex() throws IOException { CommitLock.Shared shared = mCommitLock.acquireShared(); try { return newTemporaryTree(null); } finally { shared.release(); } }
@Override public Tree newTemporaryIndex() throws IOException { CommitLock.Shared shared = mCommitLock.acquireShared(); try { return newTemporaryTree(false); } finally { shared.release(); } }
private Tree allocSortTree() throws IOException { checkState(); Tree tree; Node root; int size = mSortTreePoolSize; if (size > 0) { tree = mSortTreePool[--size]; mSortTreePoolSize = size; root = latchRootDirty(tree); } else { tree = mDatabase.newTemporaryTree(true); root = tree.mRoot; } root.asSortLeaf(); return tree; }