Examples of latch()


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

            /*
             * See the evictIN() method in this class for an explanation for
             * calling latchNoWait().
             */
            if (inline) {
                renewedChild.latch(CacheMode.UNCHANGED);
            } else {
                if (!renewedChild.latchNoWait(CacheMode.UNCHANGED)) {
                    return evictBytes;
                }
            }
View Full Code Here

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

                   node.getGenericLogType()),
             node, lnKey);
        if (nodeInCache && node.isIN()) {
            IN nodeAsIN = (IN) node;
            try {
                nodeAsIN.latch(CacheMode.UNCHANGED);
                accumulateLSNs(nodeAsIN, pendingLSNs);
            } finally {
                nodeAsIN.releaseLatch();
            }
        }
View Full Code Here

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

        boolean isIN = (node instanceof IN);
        IN in = null;
        try {
            if (isIN) {
                in = (IN) node;
                in.latch(CacheMode.UNCHANGED);
            }
            callProcessLSNHandleExceptions
                (lsn, node.getGenericLogType(), node, lnKeyEntry.getData());

            if (isIN) {
View Full Code Here

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

        assert (inEntry != null) : DbLsn.getNoFormatString(lsn);
        incInternalMemoryUsage(- inEntry.getMemorySize());
        IN in = inEntry.in;
        boolean isLatchedAlready = in.isLatchOwnerForWrite();
        if (!isLatchedAlready) {
            in.latch();
        }

        try {
            int index = inEntry.index;
View Full Code Here

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

                /*
                 * Latch and add item with valid parentIndex, so we will
                 * release the latch in the finally statement.
                 */
                child.latch(CacheMode.UNCHANGED);
                INLogItem item = new INLogItem();
                item.parentIndex = index;
                itemList.add(item);

                if (child.getDirty()) {
View Full Code Here

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

            if (root == null) {
                return null;
            }
            IN rootIN = (IN) root.fetchTarget(db, null);
            rootIN.latch(CacheMode.UNCHANGED);
            try {
                if (rootIN.getNodeId() == targetNodeId) {

                    /*
                     * Find dirty descendants to avoid logging nodes with
View Full Code Here

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

             * root ChildReference.  We still do this for compatibility with
             * old log versions but may be able to remove it in the future.
             */
            if (DbLsn.compareTo(root.getLsn(), logLsn) <= 0) {
                IN rootIN = (IN) root.fetchTarget(db, null);
                rootIN.latch(Cleaner.UPDATE_GENERATION);
                return rootIN;
            } else {
                return null;
            }
        }
View Full Code Here

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

         * have a IN.postRecoveryInit.
         */
        final long logLsn = reader.getLastLsn();
        final IN in = reader.getIN(db);
        in.postRecoveryInit(db, logLsn);
        in.latch();

        /*
         * Track the levels, in case we need an extra splits vs ckpt
         * reconcilliation.
         */
 
View Full Code Here

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

                    in = inClone;
                    in.postFetchInit(db, logLsn);
                    result.parent.updateNode
                        (result.index, in, null /*lnSlotKey*/);
                }
                in.latch(Cleaner.UPDATE_GENERATION);
                return in;
            }

            /*
             * If the tree and log LSNs are unequal, then we must get the full
View Full Code Here

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

             * getParentINForChildIN takes exclusive latches above, so we use
             * fetchTargetWithExclusiveLatch.
             */
            final IN in = (IN) result.parent.fetchTargetWithExclusiveLatch
                (result.index);
            in.latch(Cleaner.UPDATE_GENERATION);
            return in;
        } finally {
            if ((result != null) && (result.exactParentFound)) {
                result.parent.releaseLatch();
            }
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.