Package com.sun.sgs.service.store.db

Examples of com.sun.sgs.service.store.db.DbTransaction.commit()


      useAllocationBlockPlaceholders =
    env.useAllocationBlockPlaceholders();
      freeObjectIds = new FreeObjectIds(useAllocationBlockPlaceholders);
      removeUnusedAllocationPlaceholders(dbTxn);
      done = true;
      dbTxn.commit();

            logger.log(Level.CONFIG,
                       "Created DataStoreImpl with properties:" +
                       "\n  " + DIRECTORY_PROPERTY + "=" + specifiedDirectory +
                       "\n  " + ENVIRONMENT_CLASS_PROPERTY + "=" +
View Full Code Here


    newLastObjectId =
        newNextObjectId + ALLOCATION_BLOCK_SIZE - 1;
    maybeUpdateAllocationBlockPlaceholders(
        dbTxn, newLastObjectId);
    done = true;
    dbTxn.commit();
      } finally {
    if (!done) {
        dbTxn.abort();
    }
      }
View Full Code Here

  boolean done = false;
  try {
      long id = DataStoreHeader.getNextId(
    key, infoDb, dbTxn, blockSize);
      done = true;
      dbTxn.commit();
      return id;
  } finally {
      if (!done) {
    dbTxn.abort();
      }
View Full Code Here

    infoDb = dbs.info();
    classesDb = dbs.classes();
    oidsDb = dbs.oids();
    namesDb = dbs.names();
    txnDone = true;
    txn.commit();
      } finally {
    if (!txnDone) {
        txn.abort();
    }
      }
View Full Code Here

      DbTransaction txn = env.beginTransaction(txnTimeout);
      boolean txnDone = false;
      try {
    long result = DbUtilities.getNextObjectId(infoDb, txn, numIds);
    txnDone = true;
    txn.commit();
    return result;
      } finally {
    if (!txnDone) {
        txn.abort();
    }
View Full Code Here

      DbTransaction txn = env.beginTransaction(txnTimeout);
      boolean txnDone = false;
      try {
    byte[] data = oidsDb.get(txn, encodeLong(oid), false);
    txnDone = true;
    txn.commit();
    return (data == null) ? null
        : new GetObjectResults(
      data, getWaiting(oid) == GetWaitingResult.WRITERS);
      } finally {
    if (!txnDone) {
View Full Code Here

      DbTransaction txn = env.beginTransaction(txnTimeout);
      boolean txnDone = false;
      try {
    byte[] result = oidsDb.get(txn, encodeLong(oid), true);
    txnDone = true;
    txn.commit();
    GetWaitingResult waiters = getWaiting(oid);
    return (result == null) ? null
        : new GetObjectForUpdateResults(
      result, waiters == GetWaitingResult.WRITERS,
      waiters == GetWaitingResult.READERS);
View Full Code Here

      DbTransaction txn = env.beginTransaction(txnTimeout);
      boolean txnDone = false;
      try {
    oidsDb.markForUpdate(txn, encodeLong(oid));
    txnDone = true;
    txn.commit();
      } finally {
    if (!txnDone) {
        txn.abort();
    }
      }
View Full Code Here

          getWaiting(oid) == GetWaitingResult.WRITERS);
    } finally {
        cursor.close();
    }
    txnDone = true;
    txn.commit();
      } finally {
    if (!txnDone) {
        txn.abort();
    }
      }
View Full Code Here

      oid = hasNext ? decodeLong(cursor.getValue()) : -1;
        } finally {
      cursor.close();
        }
        txnDone = true;
        txn.commit();
    } finally {
        if (!txnDone) {
      txn.abort();
        }
    }
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.