private boolean verifyFailed(int level, VerificationObserver observer, String message) { long id = mId; releaseShared(); observer.failed = true; return observer.indexNodeFailed(id, level, message); } }
/** * Reset with leaf already latched shared. */ private void resetLatched(Node node) { node.releaseShared(); reset(); }
/** * Reset with leaf already latched shared. */ private void resetLatched(Node node) { node.releaseShared(); reset(); }
/** * Reset with leaf already latched shared. */ private void resetLatched(Node node) { node.releaseShared(); reset(); }
private boolean verifyFailed(int level, VerificationObserver observer, String message) { long id = mId; releaseShared(); observer.failed = true; return observer.indexNodeFailed(id, level, message); } }
/** * Non-transactionally moves the cursor to the next entry, which might refer to a node * which is empty or full of ghosts. Key and value are not loaded. */ private void nextAny() throws IOException { Node node = toNextAny(leafSharedNotSplit()); if (node != null) { node.releaseShared(); } }
@Override public final boolean isClosed() { Node root = mRoot; root.acquireShared(); boolean closed = root.mPage == p_closedTreePage(); root.releaseShared(); return closed; }
/** * Non-transactionally moves the cursor to the next entry, which might refer to a node * which is empty or full of ghosts. Key and value are not loaded. */ private void nextAny() throws IOException { Node node = toNextAny(leafSharedNotSplit()); if (node != null) { node.releaseShared(); } }
@Override public final boolean isClosed() { Node root = mRoot; root.acquireShared(); boolean closed = root.mPage == p_closedTreePage(); root.releaseShared(); return closed; }
@Override public final boolean isClosed() { Node root = mRoot; root.acquireShared(); boolean closed = root.mPage == p_closedTreePage(); root.releaseShared(); return closed; }
/** * Non-transactionally moves the cursor to the next entry, which might refer to a node * which is empty or full of ghosts. Key and value are not loaded. */ private void nextLeaf() throws IOException { Node node = toNextLeaf(frameSharedNotSplit()); if (node != null) { node.releaseShared(); } }
@Override public long length() throws IOException { CursorFrame frame; try { frame = mCursor.leafSharedNotSplit(); } catch (IllegalStateException e) { checkOpen(); throw e; } long result = action(frame, OP_LENGTH, 0, null, 0, 0); frame.mNode.releaseShared(); return result; }
@Override public final long valueLength() throws IOException { CursorFrame frame; try { frame = frameSharedNotSplit(); } catch (IllegalStateException e) { valueCheckOpen(); throw e; } long result = TreeValue.action(null, this, frame, TreeValue.OP_LENGTH, 0, null, 0, 0); frame.mNode.releaseShared(); return result; }
@Override public long length() throws IOException { CursorFrame frame; try { frame = mCursor.leafSharedNotSplit(); } catch (IllegalStateException e) { checkOpen(); throw e; } long result = action(frame, OP_LENGTH, 0, null, 0, 0); frame.mNode.releaseShared(); return result; }
@Override int doRead(long pos, byte[] buf, int off, int len) throws IOException { CursorFrame frame; try { frame = mCursor.leafSharedNotSplit(); } catch (IllegalStateException e) { checkOpen(); throw e; } int result = (int) action(frame, OP_READ, pos, buf, off, len); frame.mNode.releaseShared(); return result; }
@Override int doRead(long pos, byte[] buf, int off, int len) throws IOException { CursorFrame frame; try { frame = mCursor.leafSharedNotSplit(); } catch (IllegalStateException e) { checkOpen(); throw e; } int result = (int) action(frame, OP_READ, pos, buf, off, len); frame.mNode.releaseShared(); return result; }
/** * Non-transactionally moves the cursor to the first leaf node, which might be empty or * full of ghosts. Leaf frame remains latched when method returns normally. Key and value * are not loaded. */ final void firstAny() throws IOException { reset(); toFirstLeaf(new CursorFrame(), latchRootNode()); mLeaf.mNode.releaseShared(); }
/** * Non-transactionally moves the cursor to the first leaf node, which might be empty or * full of ghosts. Leaf frame remains latched when method returns normally. Key and value * are not loaded. */ final void firstAny() throws IOException { reset(); toFirstLeaf(new CursorFrame(), latchRootNode()); mLeaf.mNode.releaseShared(); }
/** * Non-transactionally moves the cursor to the first leaf node, which might be empty or * full of ghosts. Key and value are not loaded. */ final void firstLeaf() throws IOException { reset(); toFirstLeaf(new CursorFrame(), latchRootNode()); mFrame.mNode.releaseShared(); }
/** * Returns the highest position within the original node as if it had not split. */ final int highestPos(Node node) { int pos; Node sibling = latchSibling(); if (node.isLeaf()) { pos = node.highestLeafPos() + 2 + sibling.highestLeafPos(); } else { pos = node.highestInternalPos() + 2 + sibling.highestInternalPos(); } sibling.releaseShared(); return pos; }