Package edu.berkeley.sparrow.thrift.PongService

Examples of edu.berkeley.sparrow.thrift.PongService.AsyncClient


  private static void pongUsingAsynchronousClient(String hostname) throws Exception {
    InetSocketAddress address = new InetSocketAddress(hostname, 12345);
    while (true) {
      Long t = System.nanoTime();
      AsyncClient client = pongClientPool.borrowClient(address);
      System.out.println("Getting client took " + ((System.nanoTime() - t) / (1000 * 1000)) +
                         "ms");
      client.ping("PING", new Callback(address, System.nanoTime()));
      Thread.sleep(30);
    }
  }
View Full Code Here

TOP

Related Classes of edu.berkeley.sparrow.thrift.PongService.AsyncClient

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.