Package com.continuuity.tephra

Examples of com.continuuity.tephra.TransactionNotInProgressException


          public Boolean execute(TransactionServiceThriftClient client)
            throws Exception {
            try {
              return client.canCommit(tx, changeIds);
            } catch (TTransactionNotInProgressException e) {
              throw new TransactionNotInProgressException(e.getMessage());
            }
          }
        });
    } catch (TransactionNotInProgressException e) {
      throw e;
View Full Code Here


          public Boolean execute(TransactionServiceThriftClient client)
            throws Exception {
            try {
              return client.commit(tx);
            } catch (TTransactionNotInProgressException e) {
              throw new TransactionNotInProgressException(e.getMessage());
            }
          }
        });
    } catch (TransactionNotInProgressException e) {
      throw e;
View Full Code Here

          public Boolean execute(TransactionServiceThriftClient client)
            throws Exception {
            try {
              return client.canCommit(tx, changeIds);
            } catch (TTransactionNotInProgressException e) {
              throw new TransactionNotInProgressException(e.getMessage());
            }
          }
        });
    } catch (TransactionNotInProgressException e) {
      throw e;
View Full Code Here

          public Boolean execute(TransactionServiceThriftClient client)
            throws Exception {
            try {
              return client.commit(tx);
            } catch (TTransactionNotInProgressException e) {
              throw new TransactionNotInProgressException(e.getMessage());
            }
          }
        });
    } catch (TransactionNotInProgressException e) {
      throw e;
View Full Code Here

    txMetricsCollector.gauge("canCommit", 1);
    Stopwatch timer = new Stopwatch().start();
    if (inProgress.get(tx.getWritePointer()) == null) {
      // invalid transaction, either this has timed out and moved to invalid, or something else is wrong.
      if (invalid.contains(tx.getWritePointer())) {
        throw new TransactionNotInProgressException(
          String.format("canCommit() is called for transaction %d that is not in progress (it is known to be invalid)",
                        tx.getWritePointer()));
      } else {
        throw new TransactionNotInProgressException(
          String.format("canCommit() is called for transaction %d that is not in progress", tx.getWritePointer()));
      }
    }

    Set<ChangeId> set = Sets.newHashSetWithExpectedSize(changeIds.size());
View Full Code Here

      synchronized (this) {
        ensureAvailable();
        if (inProgress.get(tx.getWritePointer()) == null) {
          // invalid transaction, either this has timed out and moved to invalid, or something else is wrong.
          if (invalid.contains(tx.getWritePointer())) {
            throw new TransactionNotInProgressException(
              String.format("canCommit() is called for transaction %d that is not in progress " +
                              "(it is known to be invalid)", tx.getWritePointer()));
          } else {
            throw new TransactionNotInProgressException(
              String.format("canCommit() is called for transaction %d that is not in progress", tx.getWritePointer()));
          }
        }

        // todo: these should be atomic
View Full Code Here

TOP

Related Classes of com.continuuity.tephra.TransactionNotInProgressException

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.