Package com.sleepycat.je

Examples of com.sleepycat.je.TransactionConfig


    private void checkUpgrade(LockType firstRequest, LockType secondRequest,
                              LockGrantType secondGrantType,
                              LockType finalType)
        throws Exception {

  Locker txn1 = new AutoTxn(envImpl, new TransactionConfig());
        MemoryBudget mb = envImpl.getMemoryBudget();

        try {
            Lock lock = new Lock(new Long(1));
View Full Code Here


     * waiter list is examined by Lock.lock().
     */
    public void testRangeInsertWaiterConflict()
        throws Exception {

  Locker txn1 = new AutoTxn(envImpl, new TransactionConfig());
  Locker txn2 = new AutoTxn(envImpl, new TransactionConfig());
  Locker txn3 = new AutoTxn(envImpl, new TransactionConfig());
        MemoryBudget mb = envImpl.getMemoryBudget();

        try {
            Lock lock = new Lock(new Long(1));
            assertEquals(LockGrantType.NEW,
View Full Code Here

    }

    public void testTransfer()
        throws Exception {

  Locker txn1 = new AutoTxn(envImpl, new TransactionConfig());
  Locker txn2 = new AutoTxn(envImpl, new TransactionConfig());
  Locker txn3 = new AutoTxn(envImpl, new TransactionConfig());
  Locker txn4 = new AutoTxn(envImpl, new TransactionConfig());
  Locker txn5 = new AutoTxn(envImpl, new TransactionConfig());
        MemoryBudget mb = envImpl.getMemoryBudget();

        try {
            /* Transfer from one locker to another locker. */
            Lock lock = new Lock(new Long(1));
View Full Code Here

    }

    public void testReadCommittedTransaction()
        throws Exception {

        TransactionConfig config = new TransactionConfig();
        config.setReadCommitted(true);
        doReadCommitted(map, config);
    }
View Full Code Here

    public void testReadUncommittedTransaction()
        throws Exception {

        TransactionRunner runner = new TransactionRunner(env);
        TransactionConfig config = new TransactionConfig();
        config.setReadUncommitted(true);
        runner.setTransactionConfig(config);
        assertNull(currentTxn.getTransaction());
        runner.run(new TransactionWorker() {
            public void doWork() throws Exception {
                assertNotNull(currentTxn.getTransaction());
View Full Code Here

            this.expectSync = expectSync;
            this.expectWrite = expectWrite;
        }

        TransactionConfig getTxnConfig() {
            TransactionConfig txnConfig = new TransactionConfig();
            txnConfig.setSync(txnSync);
            txnConfig.setWriteNoSync(txnWriteNoSync);
            txnConfig.setNoSync(txnNoSync);
            return txnConfig;
        }
View Full Code Here

         */
        long prepareId = reader.getTxnPrepareId();
        Long prepareIdL = new Long(prepareId);
        if (!committedTxnIds.contains(prepareIdL) &&
      !abortedTxnIds.contains(prepareIdL)) {
      TransactionConfig txnConf = new TransactionConfig();
      Txn preparedTxn = new Txn(env, txnConf, prepareId);
      preparedTxn.setLockTimeout(0);
      preparedTxns.put(prepareIdL, preparedTxn);
      env.getTxnManager().registerXATxn
          (reader.getTxnPrepareXid(), preparedTxn, true);
View Full Code Here

        }
        DbTree dbTree = env.getDbMapTree();
        Locker autoTxn = null;
        boolean operationOk = false;
        try {
            autoTxn = new AutoTxn(env, new TransactionConfig());
            DatabaseImpl db = dbTree.getDb
                (autoTxn, DbTree.UTILIZATION_DB_NAME, null,
                 true /* Eviction allowed. */);
            if (db == null) {
                if (env.isReadOnly()) {
View Full Code Here

  throws DatabaseException {

  if (envImpl.isNoLocking()) {
      return new BasicLocker(envImpl);
  } else {
      return new AutoTxn(envImpl, new TransactionConfig());
  }
    }
View Full Code Here

            throw new IllegalStateException("Message store durability is not set");
        }

        try
        {
            TransactionConfig transactionConfig = new TransactionConfig();
            transactionConfig.setDurability(getRealMessageStoreDurability());
            return _environment.beginTransaction(null, transactionConfig);
        }
        catch(DatabaseException e)
        {
            throw handleDatabaseException("Failure to start transaction", e);
View Full Code Here

TOP

Related Classes of com.sleepycat.je.TransactionConfig

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.