本文整理了Java中org.jgroups.util.Util.parseCommaDelimitedLongs()
方法的一些代码示例,展示了Util.parseCommaDelimitedLongs()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.parseCommaDelimitedLongs()
方法的具体详情如下:
包路径:org.jgroups.util.Util
类名称:Util
方法名:parseCommaDelimitedLongs
[英]Parses comma-delimited longs; e.g., 2000,4000,8000. Returns array of long, or null.
[中]解析逗号分隔的长字符;e、 g.,200040008000。返回long或null的数组。
代码示例来源:origin: wildfly/wildfly
public Object convert(Object obj, Class<?> propertyFieldType, String propertyName, String propertyValue, boolean check_scope) throws Exception {
long tmp [] = Util.parseCommaDelimitedLongs(propertyValue);
if(tmp != null && tmp.length > 0){
return tmp;
}else{
// throw new Exception ("Invalid long array specified in " + propertyValue);
return null;
}
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
public Object convert(Object obj, Class<?> propertyFieldType, String propertyName, String propertyValue, boolean check_scope) throws Exception {
long tmp [] = Util.parseCommaDelimitedLongs(propertyValue);
if(tmp != null && tmp.length > 0){
return tmp;
}else{
// throw new Exception ("Invalid long array specified in " + propertyValue);
return null;
}
}
代码示例来源:origin: org.jgroups/com.springsource.org.jgroups
public boolean setProperties(Properties props) {
String str;
long[] tmp;
super.setProperties(props);
str=props.getProperty("print_local_addr");
if(str != null) {
print_local_addr=Boolean.valueOf(str).booleanValue();
props.remove("print_local_addr");
}
str=props.getProperty("timeout");
if(str != null) {
tmp=Util.parseCommaDelimitedLongs(str);
props.remove("timeout");
if(tmp != null && tmp.length > 0)
timeout=tmp;
}
str=props.getProperty("max_xmits");
if(str != null) {
max_xmits=Integer.parseInt(str);
props.remove("max_xmits");
}
if(!props.isEmpty()) {
log.error("SMACK.setProperties(): the following properties are not recognized: " + props);
return false;
}
return true;
}
代码示例来源:origin: org.jgroups/com.springsource.org.jgroups
str=props.getProperty("timeout");
if(str != null) {
tmp=Util.parseCommaDelimitedLongs(str);
if(tmp != null && tmp.length > 0)
timeout=tmp;
代码示例来源:origin: org.jgroups/com.springsource.org.jgroups
str=props.getProperty("retransmit_timeout");
if(str != null) {
tmp=Util.parseCommaDelimitedLongs(str);
props.remove("retransmit_timeout");
if(tmp != null && tmp.length > 0) {
内容来源于网络,如有侵权,请联系作者删除!