Examples of latch()


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

            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. */
 
View Full Code Here

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

                                /* This duplicate tree has been deleted. */
                                return OperationStatus.NOTFOUND;
                            }

                            DIN duplicateRoot = (DIN) bin.fetchTarget(index);
                            duplicateRoot.latch();
                            try {
                                DupCountLN dcl = duplicateRoot.getDupCountLN();
                                if (dcl != null) {
                                    dcl.accumulateStats(treeStatsAccumulator);
                                }
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()

             * deadlocks.  If we don't get the no-wait latch, then release the
             * DBIN latch and latch in the proper order down the tree.
       */
            if (!dupRoot.latchNoWait()) {
                releaseDBIN();
                dupRoot.latch();
                latchDBIN();
            }
        } else {
            dupRoot.latch();
        }
View Full Code Here

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

                releaseDBIN();
                dupRoot.latch();
                latchDBIN();
            }
        } else {
            dupRoot.latch();
        }

        return dupRoot;
    }
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()

     * for it. [#11307].
     */
                if (found) {
        DIN duplicateRoot = (DIN)
      location.bin.fetchTarget(location.index);
                    duplicateRoot.latch();
                    try {
                        if (DbLsn.compareTo(logLsn, location.childLsn) == 0) {
                            /* DupCountLN needs replacing. */
                            duplicateRoot.
                                updateDupCountLNRefAndNullTarget(abortLsn);
View Full Code Here

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

            public IN doWork(ChildReference root)
                throws DatabaseException {

                IN rootIN = (IN) root.fetchTarget(db, null);
                rootIN.latch(CacheMode.UNCHANGED);
                try {
                    /* Re-check that all conditions still hold. */
                    boolean isDirty = rootIN.getDirty();
                    if (rootIN == target &&
                        rootIN.isDbRoot() &&
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.