Package com.arjuna.ats.arjuna

Examples of com.arjuna.ats.arjuna.AtomicAction.begin()


  public int getValue(int retry, int wait_time)
  {
    int return_value = 0;

    AtomicAction a = new AtomicAction();
    a.begin();
    try
    {
      int locking_result = LockResult.REFUSED;
      int locking_attempt_count = 0;
      Lock lck = new Lock(LockMode.READ);
View Full Code Here


      {
        for (int i = 0; i < mMaxIteration; i++)
        {
          //start transaction
          AtomicAction a = new AtomicAction();
          a.begin();
          int incValue = mLockRecordList[j].increase();
          if (i % 2 == 0)
          {
            a.commit();
            expectedValue[j] += incValue;
View Full Code Here

      for (int j = 0; j < mNumberOfResources; j++)
      {
        for (int i = 0; i < mMaxIteration; i++)
        {
          AtomicAction b = new AtomicAction();
          b.begin();
          int incValue = mLockRecordList[j].increase();
          if (i % 2 == 0)
          {
            b.commit();
            expectedValue[j] += incValue;
View Full Code Here

    AtomicAction A = new AtomicAction();
    Uid txId = A.get_uid();
   
    System.err.println("IMPORTANT: ignore warnings about USER_DEF_FIRST0 as they are expected due to BasicRecord usage!");
   
    A.begin();

    A.add(new BasicRecord());

    A.commit();
   
View Full Code Here

private void test () throws Exception
    {
  AtomicAction A = new AtomicAction();
  BasicObject bo = new BasicObject();

  A.begin();

  bo.set(2);

  A.commit();
    }
View Full Code Here

        }

        // Create a new JBoss transaction
        AtomicAction tx = new AtomicAction();
        // Allocate space to monitor the transaction, this variable is overriden each time the transaction is used.
        int actionStatus = tx.begin(); // Top level begin

        // If the transaction was successful began
        if (actionStatus == ActionStatus.RUNNING)
        {
            // Enlist the participant
View Full Code Here

private void test () throws Exception
    {
  AtomicAction A = new AtomicAction();
  BasicObject bo = new BasicObject();
 
  A.begin();

  bo.set(2);
 
  A.commit();
    }
View Full Code Here

    {
  for (int i = 0; i < 100; i++)
  {
      AtomicAction A = new AtomicAction();
 
      A.begin();

      BasicObject bo = new BasicObject();

      bo.set(2);
 
View Full Code Here

 
      A.commit();

      AtomicAction B = new AtomicAction();
 
      B.begin();
 
      bo.destroy();
 
      B.abort();
 
View Full Code Here

 
      B.abort();
 
      AtomicAction C = new AtomicAction();
     
      C.begin();
     
      bo.destroy();
     
      C.commit();
  }
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.