Package com.sleepycat.je.txn

Examples of com.sleepycat.je.txn.Txn.commit()


            }
            removeReferringHandle(new Transaction(this, txn));
            if (txn.isOnlyAbortable()) {
                throw new XAException(XAException.XA_RBROLLBACK);
            }
            txn.commit(xid);
        } catch (DatabaseException DE) {
            throwNewXAException(DE);
        }
        if (DEBUG) {
            System.out.println("*** commit finished");
View Full Code Here


        try {
            txn = new ReadonlyTxn(rImpl, txnConfig);
            RepGroupImpl group = fetchGroup(groupName, dbImpl, txn);
            /* Correct summary info since we are reading uncommitted data */
            group.makeConsistent();
            txn.commit();
            txn = null;

            return group;
        } finally {
            if (txn != null) {
View Full Code Here

                throw EnvironmentFailureException.unexpectedState
                    ("Couldn't write first group entry " + status);
            }
            cursor.close();
            cursor = null;
            txn.commit();
            txn = null;
        } finally {
            if (cursor != null) {
                cursor.close();
            }
View Full Code Here

                                 ensureNode.getNodeId() +
                                 " ack status: " + miInDb.isQuorumAck());
            }
            cursor.close();
            cursor = null;
            txn.commit();
            txn = null;
        } finally {
            if (cursor != null) {
                cursor.close();
            }
View Full Code Here

                cursor.close();
            }

            if (txn != null) {
                if (ok) {
                    txn.commit(NO_ACK_NO_SYNC_DURABILITY);
                } else {
                    txn.abort();
                }
                txn = null;
            }
View Full Code Here

        nameIdPair.revertToNull(); /* read transaction, so null id is ok. */

        /* Now delete old nodes and the group, and establish a new group */
        Txn txn = new MasterTxn(repImpl, txnConfig, nameIdPair);
        RepGroupImpl prevRepGroup = fetchGroupObject(txn, dbImpl);
        txn.commit();

        final int nodeIdSequenceStart = prevRepGroup.getNodeIdSequence();

        final DatabaseEntry keyEntry = new DatabaseEntry();
        final DatabaseEntry value = new DatabaseEntry();
View Full Code Here

                LoggerUtils.info(logger, repImpl, "Removing node: " + key);
                mcursor.delete();
            }
        }
        mcursor.close();
        txn.commit();

        /* Now add the first node of the new group. */
        ensureMember(firstNode);
        if (firstNodeId != firstNode.getNodeId()) {
            throw new IllegalStateException("Expected nodeid:" + firstNodeId +
View Full Code Here

                dbConfig.setExclusiveCreate(true);
                DbInternal.setReplicated(dbConfig, true);

                newDbImpl = getDbTree().createInternalDb
                    (txn, DbType.REP_GROUP.getInternalName(), dbConfig);
                txn.commit();
                txn = null;
            } finally {
                if (txn!= null) {
                    txn.abort();
                }
View Full Code Here

                                          null /* databaseHandle */);
            if (newDbImpl == null) {
                throw new DatabaseNotFoundException
                    (DbType.REP_GROUP.getInternalName());
            }
            txn.commit();
            txn = null;

            groupDbImpl = newDbImpl;
            return groupDbImpl;
        } finally {
View Full Code Here

        try {
            synchronized (flushSynchronizer) {
                pruneDatabaseHead(deleteEnd, deleteFileNum, txn);
                flushToDatabase(txn);
            }
            txn.commit();
            envImpl.flushLog(true /*fsync required*/);
            success = true;
        } finally {
            if (!success) {
                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.