Package org.lealone.hbase.transaction

Examples of org.lealone.hbase.transaction.Transaction


            beginTransaction();
        return transaction;
    }

    private void beginTransaction() {
        transaction = new Transaction(this);
    }
View Full Code Here


    @Override
    public void commit(boolean ddl, String allLocalTransactionNames) {
        if (this.transaction != null) {
            try {
                //避免重复commit
                Transaction transaction = this.transaction;
                this.transaction = null;
                if (allLocalTransactionNames == null)
                    allLocalTransactionNames = transaction.getAllLocalTransactionNames();
                List<Future<Void>> futures = null;
                if (!getAutoCommit() && sessionRemoteCache.size() > 0)
                    futures = parallelCommitOrRollback(allLocalTransactionNames);

                transaction.commit(allLocalTransactionNames);
                super.commit(ddl);

                if (futures != null)
                    waitFutures(futures);
            } finally {
View Full Code Here

    @Override
    public void rollback() {
        if (this.transaction != null) {
            try {
                Transaction transaction = this.transaction;
                this.transaction = null;
                List<Future<Void>> futures = null;
                if (!getAutoCommit() && sessionRemoteCache.size() > 0)
                    futures = parallelCommitOrRollback(null);

                transaction.rollback();
                super.rollback();

                if (futures != null)
                    waitFutures(futures);
            } finally {
View Full Code Here

TOP

Related Classes of org.lealone.hbase.transaction.Transaction

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.