本文整理汇总了Java中org.jgroups.conf.PropertyConverters类的典型用法代码示例。如果您正苦于以下问题:Java PropertyConverters类的具体用法?Java PropertyConverters怎么用?Java PropertyConverters使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PropertyConverters类属于org.jgroups.conf包,在下文中一共展示了PropertyConverters类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setInitialHosts
import org.jgroups.conf.PropertyConverters; //导入依赖的package包/类
@Property(name="initial_hosts", description="Comma delimited list of hosts to be contacted for initial membership",
converter=PropertyConverters.InitialHosts2.class)
public void setInitialHosts(List<InetSocketAddress> hosts) {
if(hosts == null || hosts.isEmpty())
throw new IllegalArgumentException("initial_hosts must contain the address of at least one GossipRouter");
initial_hosts.addAll(hosts) ;
}
示例2: setTimeout
import org.jgroups.conf.PropertyConverters; //导入依赖的package包/类
@Deprecated
@Property(name="timeout",converter=PropertyConverters.IntegerArray.class,
description="list of timeouts", deprecatedMessage="not used anymore")
public void setTimeout(int[] val) {}
示例3: setTimeout
import org.jgroups.conf.PropertyConverters; //导入依赖的package包/类
@Deprecated
@Property(name="timeout",converter=PropertyConverters.IntegerArray.class, deprecatedMessage="not used anymore")
public void setTimeout(int[] val) {
if(val != null)
timeout=val;
}
示例4: setIpAddressListMethod
import org.jgroups.conf.PropertyConverters; //导入依赖的package包/类
@Property(name="ipAddressListMethod", converter=PropertyConverters.InitialHosts.class, dependsUpon="port_range")
public void setIpAddressListMethod(List<IpAddress> ia) {
this.ipAddressListMethod = ia ;
}
示例5: testPrimitiveTypes
import org.jgroups.conf.PropertyConverters; //导入依赖的package包/类
public static void testPrimitiveTypes() throws Exception {
PropertyConverter conv=new PropertyConverters.Default();
check(null, Boolean.TYPE, "true", true, conv);
check(null, Integer.TYPE, "322649", 322649, conv);
check(null, Long.TYPE, "322649", 322649L, conv);
}
示例6: testLongArray
import org.jgroups.conf.PropertyConverters; //导入依赖的package包/类
public static void testLongArray() throws Exception {
PropertyConverter conv=new PropertyConverters.LongArray();
long[] array={1,2,3,4,5};
checkArray(null, array.getClass(), "1,2,3,4,5", array, conv);
}