Examples of latch()


Examples of com.sleepycat.je.tree.DIN.latch()

            /* Determine whether this is a DupCountLN or a regular LN. */
            boolean lnIsDupCountLN = node.containsDuplicates();
      if (lnIsDupCountLN) {
    parentDIN = (DIN) node;
    parentDIN.latch(false);
                ChildReference dclRef = parentDIN.getDupCountLNRef();
                lsn = dclRef.getLsn();
                ln = (LN) dclRef.fetchTarget(db, parentDIN);
            } else {
                ln = (LN) node;
View Full Code Here

Examples of com.sleepycat.je.tree.DIN.latch()

        .getTree()
        .getFirstNode();
    DIN dupRoot = (DIN) bin.fetchTarget(0);
    bin.releaseLatch();
    bin = null;
    dupRoot.latch();
    bin = (BIN) DbInternal.dbGetDatabaseImpl(exampleDb)
        .getTree()
        .getFirstNode(dupRoot);
    bin.compress(null, true);
    bin.releaseLatch();
View Full Code Here

Examples of com.sleepycat.je.tree.DIN.latch()

        return null;
    }
                if (node.containsDuplicates()) {
                    /* It's a duplicate tree. */
                    duplicateRoot = (DIN) node;
                    duplicateRoot.latch();
                    bin.releaseLatch();
                    duplicateBin = (DBIN) tree.searchSubTree
                        (duplicateRoot, dupKey, SearchType.NORMAL, -1, null,
                         false /*updateGeneration*/);

 
View Full Code Here

Examples of com.sleepycat.je.tree.DIN.latch()

        /* If fetchTarget returns null, a deleted LN was cleaned. */
        Node n = bin.fetchTarget(index);
        if (n != null && n.containsDuplicates()) {
            DIN dupRoot = (DIN) n;
            /* Latch couple down the tree. */
            dupRoot.latch();
      releaseBIN();
            DupCountLN dupCountLN = (DupCountLN)
                dupRoot.getDupCountLNRef().fetchTarget(database, dupRoot);
            /* We can't hold latches when we acquire locks. */
            dupRoot.releaseLatch();
View Full Code Here

Examples of com.sleepycat.je.tree.DIN.latch()

       * higher in the tree than the DBIN which would be latching up the
       * tree.  So we have to latch in BIN, dupRoot, DBIN order.
       */
            /* Latch couple with the DupRoot. */
            dupRoot = (DIN) bin.fetchTarget(index);
            dupRoot.latch();

            latchDBIN();
  }
  setTargetBin();
        long oldLsn = targetBin.getLsn(targetIndex);
View Full Code Here

Examples of com.sleepycat.je.tree.DIN.latch()

             * transaction that changed the oldLsn.  Re-get the reference to
             * the LN and get the old (abort) LSN out of it.
             */
            latchBIN();
            dupRoot = (DIN) bin.fetchTarget(index);
            dupRoot.latch();
            releaseBIN();
            dupCountRef = dupRoot.getDupCountLNRef();
            long oldDclLsn = dupCountRef.getLsn();
            dclGrantAndInfo.setAbortLsn(oldDclLsn,
                                        dupCountRef.isKnownDeleted());
View Full Code Here

Examples of com.sleepycat.je.tree.DIN.latch()

                            n = in.fetchTarget(index);
                        }

                        if (n != null && n.containsDuplicates()) {
                            DIN dupRoot = (DIN) n;
                            dupRoot.latch();
                            in.releaseLatch();
                            in = null;
                            found = positionFirstOrLast(first, dupRoot);
                        } else {
View Full Code Here

Examples of com.sleepycat.je.tree.DIN.latch()

  byte[] data = Key.makeKey(matchData);

        if (containsDuplicates) {
            /* It's a duplicate tree. */
            DIN duplicateRoot = (DIN) n;
            duplicateRoot.latch();
      releaseBIN();
            dupBin = (DBIN) database.getTree().searchSubTree
                (duplicateRoot, data, Tree.SearchType.NORMAL, -1, null,
                 true /*updateGeneration*/);
            if (dupBin != null) {
View Full Code Here

Examples of com.sleepycat.je.tree.DIN.latch()

        addCursor(targetBin);
        if (n.containsDuplicates()) {
            assert !duplicateFetch;
            /* Descend down duplicate tree, doing latch coupling. */
            DIN duplicateRoot = (DIN) n;
            duplicateRoot.latch();
            targetBin.releaseLatch();
            if (positionFirstOrLast(first, duplicateRoot)) {
    try {
        return fetchCurrent(foundKey, foundData, lockType, first);
    } catch (DatabaseException DE) {
View Full Code Here

Examples of com.sleepycat.je.tree.DIN.latch()

             */
            boolean isDupCountLN = ln.containsDuplicates();
            long treeLsn;
      if (isDupCountLN) {
    parentDIN = (DIN) bin.fetchTarget(index);
    parentDIN.latch(Cleaner.UPDATE_GENERATION);
                ChildReference dclRef = parentDIN.getDupCountLNRef();
                treeLsn = dclRef.getLsn();
      } else {
                treeLsn = bin.getLsn(index);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.