Examples of rLock()


Examples of edu.vt.rt.hyflow.benchmark.realtimermi.bank.rw.IBankAccount.rLock()

      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) {
            e.printStackTrace();
          } catch (NotBoundException e) {
View Full Code Here

Examples of edu.vt.rt.hyflow.benchmark.realtimermi.bank.rw.IBankAccount.rLock()

          subAccount1.rLock();
          locked1 = true;
          server2 = (Address) Network.getAddress(Benchmark.getServerId(subAccountNum2));
          subAccount2 = (IBankAccount)LocateRegistry.getRegistry(server2.inetAddress.getHostAddress(), server2.port).lookup(subAccountNum2);
          Network.linkDelay(true, server2);
          subAccount2.rLock();
          break;
        } catch (InterruptedException e) {
          if(locked1){
            Network.linkDelay(true, server1);
            subAccount1.rUnlock();
View Full Code Here

Examples of edu.vt.rt.hyflow.benchmark.realtimermi.bank.rw.IBankAccount.rLock()

        locked1 = true;
        lockedAccounts[0] = strAccount1;
        server2 = (Address) Network.getAddress(Benchmark.getServerId(strAccount2));
        subAccount2 = (IBankAccount)LocateRegistry.getRegistry(server2.inetAddress.getHostAddress(), server2.port).lookup(strAccount2);
        Network.linkDelay(true, server2);
        subAccount2.rLock(deadline.getSeconds(), deadline.getNanoseconds(), period_ts.getSeconds(), period_ts.getNanoseconds());
        lockedAccounts[1] = strAccount2;
      } catch (InterruptedException e) {
        System.out.println("IE-1");
        if(locked1){
          Network.linkDelay(true, server1);
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.