本文整理了Java中org.jgroups.util.Util.readIntFromStdin()
方法的一些代码示例,展示了Util.readIntFromStdin()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.readIntFromStdin()
方法的具体详情如下:
包路径:org.jgroups.util.Util
类名称:Util
方法名:readIntFromStdin
暂无
代码示例来源:origin: wildfly/wildfly
void setSenderThreads() throws Exception {
int threads=Util.readIntFromStdin("Number of sender threads: ");
int old=this.num_threads;
this.num_threads=threads;
System.out.println("sender threads set to " + num_threads + " (from " + old + ")");
}
代码示例来源:origin: wildfly/wildfly
void setMessageSize() throws Exception {
msg_size=Util.readIntFromStdin("Message size: ");
System.out.println("set msg_size=" + msg_size);
}
代码示例来源:origin: wildfly/wildfly
void setSenderThreads() throws Exception {
int threads=Util.readIntFromStdin("Number of sender threads: ");
int old=this.num_threads;
this.num_threads=threads;
System.out.println("sender threads set to " + num_threads + " (from " + old + ")");
}
代码示例来源:origin: wildfly/wildfly
void setNumMessages() throws Exception {
num_msgs=Util.readIntFromStdin("Number of RPCs: ");
System.out.println("Set num_msgs=" + num_msgs);
print=num_msgs / 10;
}
代码示例来源:origin: wildfly/wildfly
void setSenderThreads() throws Exception {
int threads=Util.readIntFromStdin("Number of sender threads: ");
int old=this.num_threads;
this.num_threads=threads;
System.out.println("sender threads set to " + num_threads + " (from " + old + ")");
}
代码示例来源:origin: wildfly/wildfly
void setSenderThreads() throws Exception {
int threads=Util.readIntFromStdin("Number of sender threads: ");
int old=this.num_threads;
this.num_threads=threads;
System.out.println("sender threads set to " + num_threads + " (from " + old + ")");
}
代码示例来源:origin: wildfly/wildfly
void setNumMessages() throws Exception {
num_msgs=Util.readIntFromStdin("Number of messages: ");
System.out.println("Set num_msgs=" + num_msgs);
}
代码示例来源:origin: wildfly/wildfly
void setMessageSize() throws Exception {
msg_size=Util.readIntFromStdin("Message size: ");
System.out.println("set msg_size=" + msg_size);
}
代码示例来源:origin: wildfly/wildfly
void setNumMessages() throws Exception {
num_msgs=Util.readIntFromStdin("Number of RPCs: ");
System.out.println("Set num_msgs=" + num_msgs);
print=num_msgs / 10;
}
代码示例来源:origin: wildfly/wildfly
void setSenderThreads() throws Exception {
int threads=Util.readIntFromStdin("Number of sender threads: ");
int old=this.num_threads;
this.num_threads=threads;
System.out.println("sender threads set to " + num_threads + " (from " + old + ")");
}
代码示例来源:origin: wildfly/wildfly
void setMessageSize() throws Exception {
msg_size=Util.readIntFromStdin("Message size: ");
System.out.println("set msg_size=" + msg_size);
}
代码示例来源:origin: wildfly/wildfly
void setNumMessages() throws Exception {
num_msgs=Util.readIntFromStdin("Number of messages: ");
System.out.println("Set num_msgs=" + num_msgs);
}
代码示例来源:origin: wildfly/wildfly
void setMessageSize() throws Exception {
msg_size=Util.readIntFromStdin("Message size: ");
System.out.println("set msg_size=" + msg_size);
}
代码示例来源:origin: wildfly/wildfly
void setNumMessages() throws Exception {
num_msgs=Util.readIntFromStdin("Number of messages: ");
System.out.println("Set num_msgs=" + num_msgs);
}
代码示例来源:origin: wildfly/wildfly
void setMessageSize() throws Exception {
msg_size=Util.readIntFromStdin("Message size: ");
System.out.println("set msg_size=" + msg_size);
}
代码示例来源:origin: wildfly/wildfly
int getAnycastCount() throws Exception {
int tmp=Util.readIntFromStdin("Anycast count: ");
View tmp_view=channel.getView();
if(tmp > tmp_view.size()) {
System.err.println("anycast count must be smaller or equal to the view size (" + tmp_view + ")\n");
return -1;
}
return tmp;
}
代码示例来源:origin: wildfly/wildfly
void setAnycastCount() throws Exception {
int tmp=Util.readIntFromStdin("Anycast count: ");
View view=channel.getView();
if(tmp > view.size()) {
System.err.println("anycast count must be smaller or equal to the view size (" + view + ")\n");
return;
}
anycast_count=tmp;
System.out.println("set anycast_count=" + anycast_count);
}
代码示例来源:origin: wildfly/wildfly
protected void configChange(String name) throws Exception {
int tmp=Util.readIntFromStdin(name + ": ");
ConfigChange change=new ConfigChange(name, tmp);
send(null, change, MPerfHeader.CONFIG_CHANGE, Message.Flag.RSVP);
}
代码示例来源:origin: wildfly/wildfly
protected void loop() {
boolean looping=true;
while(looping) {
try {
int c=Util.keyPress(String.format(format, num, oob, dont_bundle));
switch(c) {
case '1':
invokeRpcs();
break;
case '2':
num=Util.readIntFromStdin("num: ");
break;
case 'o':
oob=!oob;
break;
case 'b':
dont_bundle=!dont_bundle;
break;
case 'x':
case -1:
looping=false;
break;
}
}
catch(Exception e) {
e.printStackTrace();
}
}
}
代码示例来源:origin: wildfly/wildfly
protected void configChange(String name) throws Exception {
int tmp=Util.readIntFromStdin(name + ": ");
ConfigChange change=new ConfigChange(name, tmp);
invokeRpc(configChange, RequestOptions.SYNC().flags(Message.Flag.RSVP), change);
}
内容来源于网络,如有侵权,请联系作者删除!