Package com.sleepycat.je

Examples of com.sleepycat.je.LockMode


     * Searches by record number in a BTREE-RECNO db with RECNO access.
     */
    private OperationStatus doGetSearchKey(boolean lockForWrite)
        throws DatabaseException {

        LockMode lockMode = getLockMode(lockForWrite);
        if (view.btreeRecNumAccess) {
            return cursor.getSearchRecordNumber(keyThang, primaryKeyThang,
                                                valueThang, lockMode);
        } else {
            return cursor.getSearchKey(keyThang, primaryKeyThang,
View Full Code Here


    OperationStatus getSearchBoth(Object key, Object value,
                                  boolean lockForWrite)
        throws DatabaseException {

        checkNoJoinCursor();
        LockMode lockMode = getLockMode(lockForWrite);
        view.useValue(value, valueThang, null);
        if (view.useKey(key, value, keyThang, range)) {
            if (view.isSecondary()) {
                if (otherThang == null) {
                    otherThang = new DatabaseEntry();
View Full Code Here

        protected NodeData getNodeInternal(final ObjectId id, final boolean failIfNotFound) {
            Preconditions.checkNotNull(id, "id");
            DatabaseEntry key = new DatabaseEntry(id.getRawValue());
            DatabaseEntry data = new DatabaseEntry();

            final LockMode lockMode = LockMode.READ_UNCOMMITTED;
            Transaction transaction = null;
            OperationStatus operationStatus = graphDb.get(transaction, key, data, lockMode);
            if (NOTFOUND.equals(operationStatus)) {
                if (failIfNotFound) {
                    throw new IllegalArgumentException("Graph Object does not exist: "
View Full Code Here

            DatabaseEntry key = new DatabaseEntry(commitId.getRawValue());
            DatabaseEntry data = new DatabaseEntry();
            // tell db not to retrieve data
            data.setPartial(0, 0, true);

            final LockMode lockMode = LockMode.READ_UNCOMMITTED;
            Transaction transaction = null;
            OperationStatus status = graphDb.get(transaction, key, data, lockMode);
            return SUCCESS == status;
        }
View Full Code Here

        DatabaseEntry key = new DatabaseEntry(id.getRawValue());
        DatabaseEntry data = new DatabaseEntry();
        // tell db not to retrieve data
        data.setPartial(0, 0, true);

        final LockMode lockMode = LockMode.READ_UNCOMMITTED;
        Transaction transaction = null;
        OperationStatus status = objectDb.get(transaction, key, data, lockMode);
        return SUCCESS == status;
    }
View Full Code Here

        Preconditions.checkNotNull(id, "id");
        DatabaseEntry key = new DatabaseEntry(id.getRawValue());
        DatabaseEntry data = new DatabaseEntry();

        final LockMode lockMode = LockMode.READ_UNCOMMITTED;
        Transaction transaction = null;
        OperationStatus operationStatus = objectDb.get(transaction, key, data, lockMode);
        if (NOTFOUND.equals(operationStatus)) {
            if (failIfNotFound) {
                throw new IllegalArgumentException("Object does not exist: " + id.toString()
View Full Code Here

    Cursor cursor = vlvIndex.openCursor(null, new CursorConfig());
    try
    {
      DatabaseEntry key = new DatabaseEntry();
      OperationStatus status;
      LockMode lockMode = LockMode.DEFAULT;
      DatabaseEntry data = new DatabaseEntry();

      status = cursor.getFirst(key, data, lockMode);
      SortValues lastValues = null;
      while(status == OperationStatus.SUCCESS)
View Full Code Here

TOP

Related Classes of com.sleepycat.je.LockMode

Copyright © 2018 www.massapicom. 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.