Package org.deuce.transaction

Examples of org.deuce.transaction.AbstractContext


    if(hashCode==0){
      Logger.debug("No call backs");
      return;
    }
    Logger.debug("Hashcode is " + hashCode);
    AbstractContext context = LockTable.pendingLocks.get(hashCode);
    if(context==null){
      System.out.println("Null context: " + hashCode);
      return;
    }
    Logger.debug(context + " will notified");
    synchronized (context) {
      ((Context)context).pendingLock = success;
      context.notifyAll();
      Logger.debug(context + " notified");
    }
  }
View Full Code Here


    Network.linkDelay(false, from);
    if(owner!=null)
      TrackerDirectory.repliesQueue.put(contextHashcode, owner);
    else
      Logger.debug("Null owner");
    AbstractContext context = TrackerDirectory.pendingContexts.get(contextHashcode);
    if(context!=null)
      synchronized(context){
        Logger.debug("signal.");
        context.notifyAll()
      }
    else
      System.err.println("How? " + Arrays.toString(TrackerDirectory.pendingContexts.values().toArray()));
  }
View Full Code Here

    this.id = id;
    this.price = price;
    this.total = INITIAL;
    this.used = 0;
   
    AbstractContext context = ContextDelegator.getInstance();
    if(context.getContextId()==null)
      HyFlow.getLocator().register(this); // publish it now 
    else
      context.newObject(this)// add it to context publish-set
  }
View Full Code Here

  public Customer(){}  //   required for control flow model
 
  public Customer(String id) {
    this.id = id;
   
    AbstractContext context = ContextDelegator.getInstance();
    if(context.getContextId()==null)
      HyFlow.getLocator().register(this); // publish it now 
    else
      context.newObject(this)// add it to context publish-set
  }
View Full Code Here

    this.id = id;
    this.resourceId = resourceId;
    this.price = price;
    this.type = type;
   
    AbstractContext context = ContextDelegator.getInstance();
    if(context.getContextId()==null)
      HyFlow.getLocator().register(this); // publish it now 
    else
      context.newObject(this)// add it to context publish-set
  }
View Full Code Here

      if(hashCode==0){
        Logger.debug("No call backs");
        return;
      }
 
      AbstractContext context = TransactionWaitQueue.pendingWaitQueue.remove(hashCode);
      if(context==null){
        System.out.println("Null context: " + hashCode);
        return;
      }
     
      Logger.debug(context + " will notified");
      synchronized (context) {
        context.notifyAll();
        Logger.debug(context + " notified");
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here

  public boolean isMeOwn(AbstractContext context){
    return __isMeOwn(context.getContextId());
  }
 
  public boolean __isMeOwn(Long id){
    AbstractContext w = writer.get();
    return w!=null && w.getContextId().equals(id);
  }
View Full Code Here

 
  public Node(String id, Integer value) {
    this.id = id;
    this.value = value;
   
    AbstractContext context = ContextDelegator.getInstance();
    if(context.getContextId()==null)
      HyFlow.getLocator().register(this); // publish it now 
    else
      context.newObject(this)// add it to context publish-set
  }
View Full Code Here

    if(hashCode==0){
      Logger.debug("No call backs");
      return;
    }
    Logger.debug("Hashcode is " + hashCode);
    AbstractContext context = LockTable.pendingLocks.get(hashCode);
    if(context==null){
      System.out.println("Null context: " + hashCode);
      return;
    }
    Logger.debug(context + " will notified");
    synchronized (context) {
      ((Context)context).pendingLock = success;
      context.notifyAll();
      Logger.debug(context + " notified");
    }
  }
View Full Code Here

    if(hashCode==0){
      Logger.debug("No call backs");
      return;
    }

    AbstractContext context = LockTable.pendingLocks.get(hashCode);
    if(context==null){
      System.out.println("Null context: " + hashCode + " LockResponse");
      return;
    }
    Logger.debug(context + " will notified");
    synchronized (context) {
      ((Context)context).pendingLock = success;
      context.notifyAll();
      Logger.debug(context + " notified");
    }
  }
View Full Code Here

TOP

Related Classes of org.deuce.transaction.AbstractContext

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.