Package aleph.comm.tcp

Examples of aleph.comm.tcp.Address


    /********************************************************/
  }
 
  public static void releaseLocks(String subAccountNum) {
    IBankAccount account = null;
    Address server = null;
    try {
        //System.out.println("aborted " + subAccountNum);
        server = (Address) Network.getAddress(Benchmark.getServerId(subAccountNum));
        account = (IBankAccount)LocateRegistry.getRegistry(server.inetAddress.getHostAddress(), server.port).lookup(subAccountNum);
        //Network.linkDelay(true, server);
View Full Code Here


  }
 
  public static long getTotalBalance(Timespec deadline, Timespec period_ts, int thread_id, String[] lockedAccounts, String subAccountNum1, String subAccountNum2) {
    IBankAccount subAccount1 = null;
    IBankAccount subAccount2  = null;
    Address server1 = null, server2 = null;

    long balance = Long.MIN_VALUE;
    int utility = 2; // dummy utility -- since scheduling decision is not based on utility accrued
    long usage = 0; // dummy usage -- since scheduling decision is not based on it
    ChronosScheduler.beginSegment(Priorities.TASK_RUN.getNativeId(), utility, deadline, period_ts, usage);
View Full Code Here

    return balance;
  }
 
  public long getBalanceFirst(Timespec deadline, Timespec period_ts, String strAccount) throws RemoteException, InterruptedException  {
    IBankAccount subAccount2  = null;
    Address server2 = null;
    long balance = Long.MIN_VALUE;
    boolean locked1 = false;
    int thread_id = ChronosUtil.gettid();
   
    int utility = 2; // dummy utility -- since scheduling decision is not based on utility accrued
View Full Code Here

  public static boolean transfer(Timespec deadline, Timespec period_ts, int tid, String[] lockedAccounts, String subAccountNum1, String subAccountNum2, int amount) {

    boolean result = false;
    IBankAccount subAccount1 = null;
    IBankAccount subAccount2  = null;
    Address server1 = null, server2 = null;

    long balance = Long.MIN_VALUE;
    int op_id;
    //System.out.println("Tid = " + tid + " [" + subAccountNum1 + " " + subAccountNum2 + "]");
    int utility = 2; // dummy utility -- since scheduling decision is not based on utility accrued
View Full Code Here

 
  public boolean transferFirst(Timespec deadline, Timespec period_ts, int tid, String strAccount, int op_id, int dollars) {
   
    boolean result = false;
    IBankAccount subAccount2  = null;
    Address server2 = null;
    long balance = Long.MIN_VALUE;
    boolean locked1 = false;
    int thread_id = ChronosUtil.gettid();
   
    int utility = 2; // dummy utility -- since scheduling decision is not based on utility accrued
View Full Code Here

    int node = Network.getInstance().nodesCount();
    for(int i=0; i<localObjectsCount; i++){
      for(int j=0;j<node;j++){
        if(i%node==j){
          try {
            Address server1 = (Address) Network.getAddress(Benchmark.getServerId(j+"-"+i));
            account = (IBankAccount)LocateRegistry.getRegistry(server1.inetAddress.getHostAddress(), server1.port).lookup(j+"-"+i);
            //account.rLock();
            balance+=account.checkBalance();
            //account.rUnlock();
          } catch (RemoteException e) {
View Full Code Here

    int node = Network.getInstance().nodesCount();
    for(int i=0; i<localObjectsCount; i++){
      for(int j=0;j<node;j++){
        if(i%node==j){
          try {
            Address server1 = (Address) Network.getAddress(Benchmark.getServerId(j+"-"+i));
            account = (IBankAccount)LocateRegistry.getRegistry(server1.inetAddress.getHostAddress(), server1.port).lookup(j+"-"+i);
            account.rLock();
            balance+=account.checkBalance();
            account.rUnlock();
          } catch (RemoteException e) {
View Full Code Here

              list.get(i).boosteDeadline = deadline;
              ChronosScheduler.raise_deadline_priority(list.get(i).thread_id, deadline);

              if(list.get(i).nextObject != null) {
                IBankAccount accountObject  = null;
                Address server = null;
               
                server = (Address) Network.getAddress(Benchmark.getServerId(nextObject));
                try {
                  accountObject = (IBankAccount)LocateRegistry.getRegistry(server.inetAddress.getHostAddress(), server.port).lookup(nextObject);
                } catch (AccessException e) {
View Full Code Here

    return Long.MIN_VALUE;
  }
 
  public static long getTotalBalance(Timespec deadline, Timespec period_ts, int thread_id, String[] lockedAccounts, String subAccountNum1, String subAccountNum2) {
    IBankAccount subAccount1 = null;
    Address server1 = null;

    long balance = Long.MIN_VALUE;
    int utility = 2; // dummy utility -- since scheduling decision is not based on utility accrued
    long usage = 0; // dummy usage -- since scheduling decision is not based on it
View Full Code Here

    return balance;
  }
 
  public long getBalanceFirst(Timespec deadline, Timespec period_ts, String strAccount) throws RemoteException, InterruptedException  {
    IBankAccount subAccount2  = null;
    Address server2 = null;
    long balance = Long.MIN_VALUE;
    boolean locked1 = false;
    int thread_id = ChronosUtil.gettid();
   
    int utility = 2; // dummy utility -- since scheduling decision is not based on utility accrued
View Full Code Here

TOP

Related Classes of aleph.comm.tcp.Address

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.