Package org.deuce.transaction

Examples of org.deuce.transaction.TransactionException


        Logger.debug("Validating: " + ObjectsRegistery.getKey(((AbstractDistinguishable)obj).getId()));
       
        if(!LockTable.lock(obj, locksMarker)){
          GlobalObject globalObject = ObjectsRegistery.getKey(((AbstractDistinguishable)obj).getId());
          if(globalObject==null// object was deleted
            throw new TransactionException();
          LockTable.remoteLockRequest(this, globalObject);
          if(!pendingLock){
            Logger.debug("Remote lock refused");
            throw new TransactionException();
          }
          Logger.debug("Remote lock granted");
        }
        ++lockedCounter;
      }
View Full Code Here


  }

  private WriteObjectAccess onReadAccess0( Object obj, long field){
    if(status.equals(STATUS.ABORTED)){
      System.out.println("Aborted transaction!!");
      throw new TransactionException();
    }
   
    // Check if it is already included in the write set
    System.out.println("check");
    return writeSet.contains( readSet.getCurrent() );
View Full Code Here

    return val==null ? value : val;
  }
 
  public void onWriteAccess( Object obj, Object value, long field){
    if(status.equals(STATUS.ABORTED))
      throw new TransactionException();

    WriteObjectAccess fieldAccess = writeSet.get(obj);
    fieldAccess.set(field, value);
  }
View Full Code Here

    fieldAccess.set(field, value);
  }
 
  public void onWriteAccess(Object obj, boolean value, long field) {
    if(status.equals(STATUS.ABORTED))
      throw new TransactionException();

    WriteObjectAccess fieldAccess = writeSet.get(obj);
    fieldAccess.set(field, value);
  }
View Full Code Here

        Logger.debug("Validating: " + ObjectsRegistery.getKey(((AbstractDistinguishable)obj).getId()));
       
        if(!LockTable.lock(obj, locksMarker)){
          GlobalObject globalObject = ObjectsRegistery.getKey(((AbstractDistinguishable)obj).getId());
          if(globalObject==null// object was deleted
            throw new TransactionException();
          LockTable.remoteLockRequest(this, globalObject);
          if(!pendingLock){
            Logger.debug("Remote lock refused");
            throw new TransactionException();
          }
          Logger.debug("Remote lock granted");
        }
        ++lockedCounter;
      }
View Full Code Here

        if(!LockTable.lock(obj, locksMarker, deadline_ts, tid)){
          Logger.fetal("Remote Obj for commit " + obj);
          GlobalObject globalObject = ObjectsRegistery.getKey(((AbstractDistinguishable)obj).getId());
          if(globalObject==null) {  // object was deleted
            throw new TransactionException();
          }
          Logger.debug("Lock request - Realtime Deadline = " + deadline_ts.getSeconds() + " " + deadline_ts.getNanoseconds());
          try {
            LockTable.remoteLockRequest(this, globalObject, deadline_ts, period_ts, tid);
          } catch (InterruptedException exception) {
            wasInterrupted = true;
          }
          if(!pendingLock){
            Logger.debug("Remote lock refused");
            throw new TransactionException();
          }
        }

        ++lockedCounter;
       
        // Check for expired deadline
        if(edu.vt.rt.hyflow.benchmark.Benchmark.getAbortHandler().wasAborted(ChronosUtil.gettid()))
          throw new TransactionException();
       
        if(wasInterrupted == true)
              throw new InterruptedException();
      }
          Logger.debug("Validate Read-Set");
View Full Code Here

  }

  private WriteObjectAccess onReadAccess0( Object obj, long field){
    if(status.equals(STATUS.ABORTED)){
      //System.out.println("Aborted transaction!!");
      throw new TransactionException();
    }
   
    // Check if it is already included in the write set
    //System.out.println("check");
    return writeSet.contains( readSet.getCurrent() );
View Full Code Here

    return val==null ? value : val;
  }
 
  public void onWriteAccess( Object obj, Object value, long field){
    if(status.equals(STATUS.ABORTED))
      throw new TransactionException();

    WriteObjectAccess fieldAccess = writeSet.get(obj);
    fieldAccess.set(field, value);
  }
View Full Code Here

    fieldAccess.set(field, value);
  }
 
  public void onWriteAccess(Object obj, boolean value, long field) {
    if(status.equals(STATUS.ABORTED))
      throw new TransactionException();

    WriteObjectAccess fieldAccess = writeSet.get(obj);
    fieldAccess.set(field, value);
  }
View Full Code Here

        else
          context.rollback();
        commit = true;
      }
    }
    throw new TransactionException("Failed to commit the transaction in the defined retries.");
  }
View Full Code Here

TOP

Related Classes of org.deuce.transaction.TransactionException

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.