Examples of LockType


Examples of com.sleepycat.je.txn.LockType

                    /* Get a range lock for 'prev' operations. */
                    if (!getMode.isForward()) {
                        rangeLockCurrentPosition(getMode);
                    }
                    /* Use a range lock if performing a 'next' operation. */
                    final LockType lockType =
                        getLockType(lockMode, getMode.isForward());

                    /* Do not modify key/data params until SUCCESS. */
                    final DatabaseEntry tryKey = cloneEntry(key);
                    final DatabaseEntry tryData = cloneEntry(data);
View Full Code Here

Examples of com.sleepycat.je.txn.LockType

    private OperationStatus getCurrentNoDups(final DatabaseEntry key,
                                             final DatabaseEntry data,
                                             final LockMode lockMode) {

        /* Do not use a range lock. */
        final LockType lockType = getLockType(lockMode, false);

        beginUseExistingCursor();
        final OperationStatus status =
            cursorImpl.getCurrent(key, data, lockType);
        endUseExistingCursor();
View Full Code Here

Examples of com.sleepycat.je.txn.LockType

             * for long, as that will cause deadlocks with splits and
             * checkpointing.
       */
      Locker locker = null;
      CursorImpl cursor = null;
            LockType lockType = LockType.NONE;
      try {
    locker = new BasicLocker(envImpl);
    cursor = new CursorImpl(idDatabase, locker);
    if (cursor.positionFirstOrLast(true, null)) {
                    MapLN mapLN = (MapLN) cursor.
View Full Code Here

Examples of com.sleepycat.je.txn.LockType

                if (!first) {
                    cursorImpl.lockEofNode(LockType.RANGE_READ);
                }

                /* Use a range lock for getFirst. */
                LockType lockType = getLockType(lockMode, first);

                /* Perform operation. */
                OperationStatus status =
                    positionAllowPhantoms(key, data, lockType, first);

View Full Code Here

Examples of com.sleepycat.je.txn.LockType

                           LockMode lockMode,
                           SearchMode searchMode)
        throws DatabaseException {

        if (!isSerializableIsolation(lockMode)) {
            LockType lockType = getLockType(lockMode, false);
            KeyChangeStatus result = searchAllowPhantoms
                (key, data, lockType, lockType, searchMode);
            return result.status;
        }

        /* Perform range locking to prevent phantoms and handle restarts. */
        while (true) {
            try {
                /* Do not use a range lock for the initial search. */
                LockType searchLockType = getLockType(lockMode, false);

                /* Switch to a range lock when advancing forward. */
                LockType advanceLockType = getLockType(lockMode, true);

                /* Do not modify key/data params until SUCCESS. */
                DatabaseEntry tryKey = new DatabaseEntry
                    (key.getData(), key.getOffset(), key.getSize());
                DatabaseEntry tryData = new DatabaseEntry
View Full Code Here

Examples of com.sleepycat.je.txn.LockType

                    if (!getMode.isForward()) {
                        rangeLockCurrentPosition(getMode);
                    }

                    /* Use a range lock if performing a 'next' operation. */
                    LockType lockType =
                        getLockType(lockMode, getMode.isForward());

                    /* Perform the operation. */
                    status = retrieveNextAllowPhantoms
                        (key, data, lockType, getMode);
View Full Code Here

Examples of com.sleepycat.je.txn.LockType

        /* Do not modify key/data params until SUCCESS. */
        DatabaseEntry tryKey = new DatabaseEntry();
        DatabaseEntry tryData = new DatabaseEntry();

        /* Get a range lock. */
        LockType lockType = getLockType(lockMode, true);
        OperationStatus status;
        boolean noNextKeyFound;

        /*
         * Perform a NEXT and return NOTFOUND if the key changes
View Full Code Here

Examples of com.sleepycat.je.txn.LockType

                                       DatabaseEntry data,
                                       LockMode lockMode)
        throws DatabaseException {

        /* Do not use a range lock. */
        LockType lockType = getLockType(lockMode, false);

        return cursorImpl.getCurrent(key, data, lockType);
    }
View Full Code Here

Examples of com.sleepycat.je.txn.LockType

                if (!first) {
                    cursorImpl.lockEofNode(LockType.RANGE_READ);
                }

                /* Use a range lock for getFirst. */
                LockType lockType = getLockType(lockMode, first);

                /* Perform operation. */
                OperationStatus status =
                    positionAllowPhantoms(key, data, lockType, first);

View Full Code Here

Examples of com.sleepycat.je.txn.LockType

                           LockMode lockMode,
                           SearchMode searchMode)
        throws DatabaseException {

        if (!isSerializableIsolation(lockMode)) {
            LockType lockType = getLockType(lockMode, false);
            KeyChangeStatus result = searchAllowPhantoms
                (key, data, lockType, lockType, searchMode);
            return result.status;
        }

        /* Perform range locking to prevent phantoms and handle restarts. */
        while (true) {
            try {
                /* Do not use a range lock for the initial search. */
                LockType searchLockType = getLockType(lockMode, false);

                /* Switch to a range lock when advancing forward. */
                LockType advanceLockType = getLockType(lockMode, true);

                /* Do not modify key/data params until SUCCESS. */
                DatabaseEntry tryKey = new DatabaseEntry
                    (key.getData(), key.getOffset(), key.getSize());
                DatabaseEntry tryData = new DatabaseEntry
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.