Examples of GlobalObject


Examples of FESI.Data.GlobalObject

    public void initializeExtension (Evaluator evaluator)
            throws EcmaScriptException
    {
        // XmlRpc.setDebug (true);
        this.evaluator = evaluator;
        GlobalObject go = evaluator.getGlobalObject();
        FunctionPrototype fp = (FunctionPrototype)
                evaluator.getFunctionPrototype();

        op = evaluator.getObjectPrototype();

        // the Remote constructor
        go.putHiddenProperty("Remote",
                new GlobalObjectRemote("Remote", evaluator, fp));

        // the RemoteServer constructor
        go.putHiddenProperty("RemoteServer",
                new GlobalObjectRemoteServer("RemoteServer", evaluator, fp));
    }
View Full Code Here

Examples of aleph.GlobalObject

  public LoanAccount(String id) {
    this.id = id;
   
    AbstractContext context = ContextDelegator.getInstance();
    if(context.getContextId()==null)
      new GlobalObject(this, ((AbstractDistinguishable)this).getId())// publish it now 
    else
      context.newObject(this)// add it to context publish-set
  }
View Full Code Here

Examples of aleph.GlobalObject

  public BankAccount(String id) {
    this.id = id;
   
    AbstractContext context = ContextDelegator.getInstance();
    if(context.getContextId()==null)
      new GlobalObject(this, ((AbstractDistinguishable)this).getId())// publish it now 
    else
      context.newObject(this)// add it to context publish-set
  }
View Full Code Here

Examples of aleph.GlobalObject

    this.id = id;
    this.value = value;
   
    AbstractContext context = ContextDelegator.getInstance();
    if(context.getContextId()==null)
      new GlobalObject(this, ((AbstractDistinguishable)this).getId())// publish it now 
    else
      context.newObject(this)// add it to context publish-set
  }
View Full Code Here

Examples of aleph.GlobalObject

  private static Map<Object, GlobalObject> registery = new ConcurrentHashMap<Object, GlobalObject>();
 
  public static boolean regsiterObject(GlobalObject globalKey){
    Object key = globalKey.getKey();
    while(true){
      GlobalObject oldGlobalKey = registery.get(key);
      if(oldGlobalKey==null)
        synchronized (registery) {
          if(registery.containsKey(key))
            continue// concurrent insert, retry
          registery.put(key, globalKey)// update the key
          break;
        }
      else
        synchronized (oldGlobalKey) {
          if(!registery.containsValue(oldGlobalKey))
            continue// the other thread retires
          oldGlobalKey = registery.get(key);
          if(oldGlobalKey.getVersion()>=globalKey.getVersion())
            return false// discard old populated messages
          registery.put(key, globalKey)// update the key
          break;
        }
    }
View Full Code Here

Examples of aleph.GlobalObject

  }
  public Object open (Object key, String mode){
    return open (ContextDelegator.getInstance(), key, mode);
  }
  public Object open (AbstractContext context, Object key, String mode){
    GlobalObject globalKey = ObjectsRegistery.getKey(key);
    if(globalKey==null){
      Logger.debug("Key not found!! " + key);
//      ObjectsRegistery.dump();
//      Logger.info("[" + ObjectsRegistery.getKey(key) + "]");
      throw new NotRegisteredKeyException(key);
View Full Code Here

Examples of aleph.GlobalObject

      throw e;
    }
     return object;
  }
  public Object open (AbstractContext context, Object key, String mode, Timespec deadline, Timespec period_ts, int tid) throws InterruptedException{
    GlobalObject globalKey = ObjectsRegistery.getKey(key);
    if(globalKey==null){
      Logger.debug("Key not found!! " + key);
//      ObjectsRegistery.dump();
//      Logger.info("[" + ObjectsRegistery.getKey(key) + "]");
      throw new NotRegisteredKeyException(key);
View Full Code Here

Examples of aleph.GlobalObject

  public void wakeupWaitingTask(Object key, Timespec deadline, Timespec period_ts, int tid) {
    wakeupWaitingTask (ContextDelegator.getInstance(), key, deadline, period_ts, tid);
  }

  public void wakeupWaitingTask(AbstractContext context, Object key, Timespec deadline, Timespec period_ts, int tid) {
    GlobalObject globalKey = ObjectsRegistery.getKey(key);
    if(globalKey==null){
      Logger.debug("Key not found!! " + key);
      throw new NotRegisteredKeyException(key);
    }
    Logger.debug("Key found " + key);
View Full Code Here

Examples of aleph.GlobalObject

    HyFlow.getConflictManager().open(context);
    return;
  }
  public Object open (AbstractContext context, Object key, String mode, boolean proxyFlag ){
    GlobalObject globalKey = ObjectsRegistery.getKey(key);
    if(globalKey==null){
      Logger.debug("Key not found!! " + key);
//      ObjectsRegistery.dump();
//      Logger.info("[" + ObjectsRegistery.getKey(key) + "]");
      throw new NotRegisteredKeyException(key);
View Full Code Here

Examples of aleph.GlobalObject


  public void unregister(AbstractDistinguishable object){
  }
  public void register(AbstractDistinguishable object) {
    new GlobalObject(object, object.getId())// publish it now
  }
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.