當前位置: 首頁>>代碼示例>>Java>>正文


Java PropertyConverters類代碼示例

本文整理匯總了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) ;
}
 
開發者ID:zjumty,項目名稱:jgroups-3.6.4-fixed,代碼行數:9,代碼來源:TCPGOSSIP.java

示例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) {}
 
開發者ID:zjumty,項目名稱:jgroups-3.6.4-fixed,代碼行數:5,代碼來源:UNICAST2.java

示例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;
}
 
開發者ID:zjumty,項目名稱:jgroups-3.6.4-fixed,代碼行數:7,代碼來源:UNICAST.java

示例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 ;
}
 
開發者ID:zjumty,項目名稱:jgroups-3.6.4-fixed,代碼行數:5,代碼來源:ProtocolConfigurationTest.java

示例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);
}
 
開發者ID:zjumty,項目名稱:jgroups-3.6.4-fixed,代碼行數:7,代碼來源:PropertyConvertersTest.java

示例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);
}
 
開發者ID:zjumty,項目名稱:jgroups-3.6.4-fixed,代碼行數:6,代碼來源:PropertyConvertersTest.java


注:本文中的org.jgroups.conf.PropertyConverters類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。