Package com.kylin.jgroups

Examples of com.kylin.jgroups.User


    for (int i = 0; i < 5; i++){
      Util.sleep(100);
      System.out.println("Invoke all members 'getUser' method");
      rsp_list = disp.callRemoteMethods(null
                      , "getUser"
                      , new Object[]{101, "RPC remote test", new User(1000, "Kylin Soong", "IT")}
                      , new Class[]{int.class, String.class, User.class}
                      , requestOptions);
      System.out.println("Responses:\n" + rsp_list);
    }
  }
View Full Code Here


  }

  public User getUser(int id, String name, User user) {
   
    logger.info("getUser method invoked, id: " + id + ", name: " + name + ", user: " + user);
    return new User(channel.getView().size(), "View ID: " + channel.getView().getViewId(), "View Memembers: " + channel.getView().getMembers());
  }
View Full Code Here

    for (int i = 0; i < 5; i++){
      Util.sleep(100);
      System.out.println("Invoke all members 'getUser' method");
      rsp_list = disp.callRemoteMethods(null
                      , "getUser"
                      , new Object[]{101, "RPC remote test", new User(1000, "Kylin Soong", "IT")}
                      , new Class[]{int.class, String.class, User.class}
                      , new RequestOptions(ResponseMode.GET_ALL, 5000));
      System.out.println("Responses:\n" + rsp_list);
    }
  }
View Full Code Here

  }

  public User getUser(int id, String name, User user) {
   
    logger.info("getUser method invoked, id: " + id + ", name: " + name + ", user: " + user);
    return new User(channel.getView().size(), "View ID: " + channel.getView().getViewId(), "View Memembers: " + channel.getView().getMembers());
  }
View Full Code Here

    logger.info(" -> View Id: " + channel.getView().getViewId());
    logger.info(" -> View Creater: " + channel.getView().getCreator());
    logger.info(" -> View Coordinator: " + channel.getView().getMembers().get(0));
    logger.info(" -> View Memembers: " + channel.getView().getMembers() + "\n");
   
    MethodCall method_call = new MethodCall("getUser", new Object[]{101, "RPC remote test", new User(1000, "Kylin Soong", "IT")}, new Class[]{int.class, String.class, User.class});
   
//    String methodName = RpcDispatcherTest.class.getMethod("getUser", new Class[] {int.class, String.class, User.class}).getName();
//    System.out.println(methodName);
   
    for (int i = 0; i < 5; i++){
View Full Code Here

   
    logger.info("getUser method invoked, id: " + id + ", name: " + name + ", user: " + user);
    int sleep = r.nextInt(3000);
    Util.sleep(sleep);
    logger.info("Sleep " + sleep + " milliseconds");
    return new User(sleep, "View ID: " + channel.getView().getViewId(), "View Memembers: " + channel.getView().getMembers());
  }
View Full Code Here

TOP

Related Classes of com.kylin.jgroups.User

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.