public static void main(String[] args) {
try {
RateLimiter limit = RateLimiter.create(100d);
PropertyConfigurator.configure("conf/log4j.properties");
while (true) {
if (limit.tryAcquire()) {
final HelloCommand command = new HelloCommand();
// System.out.println("result: " + command.execute());
// System.out.println("");
Future<String> future = command.queue();
System.out.println("result: " + future.get());
System.out.println("");
}
}
// Observable<String> observe = command.observe();
// observe.asObservable().subscribe((result) -> {
// System.out.println(result);
// });
} catch (Exception e) {
e.printStackTrace();
}
}
ClientTest.java 文件源码
java
阅读 28
收藏 0
点赞 0
评论 0
项目:TakinRPC
作者:
评论列表
文章目录