Search in sources :

Example 71 with JoinConfig

use of com.hazelcast.config.JoinConfig in project hazelcast by hazelcast.

the class TcpIpHostnameJoinTest method test_whenHostUnresolvable.

@Test
public void test_whenHostUnresolvable() {
    Config config = new Config();
    NetworkConfig networkConfig = config.getNetworkConfig();
    JoinConfig join = networkConfig.getJoin();
    TcpIpConfig tcpIpConfig = join.getTcpIpConfig();
    tcpIpConfig.setEnabled(true);
    tcpIpConfig.addMember(HOSTNAME1);
    tcpIpConfig.addMember("nonexistinghost");
    HazelcastInstance hz = Hazelcast.newHazelcastInstance(config);
    assertClusterSize(1, hz);
}
Also used : HazelcastInstance(com.hazelcast.core.HazelcastInstance) Config(com.hazelcast.config.Config) NetworkConfig(com.hazelcast.config.NetworkConfig) TcpIpConfig(com.hazelcast.config.TcpIpConfig) JoinConfig(com.hazelcast.config.JoinConfig) RealmConfig(com.hazelcast.config.security.RealmConfig) PartitionGroupConfig(com.hazelcast.config.PartitionGroupConfig) NetworkConfig(com.hazelcast.config.NetworkConfig) JoinConfig(com.hazelcast.config.JoinConfig) TcpIpConfig(com.hazelcast.config.TcpIpConfig) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Example 72 with JoinConfig

use of com.hazelcast.config.JoinConfig in project hazelcast by hazelcast.

the class TcpIpHostnameJoinTest method test_whenDifferentBuildNumber.

@Test
public void test_whenDifferentBuildNumber() {
    Config config = new Config();
    NetworkConfig networkConfig = config.getNetworkConfig();
    JoinConfig join = networkConfig.getJoin();
    join.getTcpIpConfig().setEnabled(true);
    join.getTcpIpConfig().addMember(HOSTNAME1);
    testJoin_With_DifferentBuildNumber(config);
}
Also used : Config(com.hazelcast.config.Config) NetworkConfig(com.hazelcast.config.NetworkConfig) TcpIpConfig(com.hazelcast.config.TcpIpConfig) JoinConfig(com.hazelcast.config.JoinConfig) RealmConfig(com.hazelcast.config.security.RealmConfig) PartitionGroupConfig(com.hazelcast.config.PartitionGroupConfig) NetworkConfig(com.hazelcast.config.NetworkConfig) JoinConfig(com.hazelcast.config.JoinConfig) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Example 73 with JoinConfig

use of com.hazelcast.config.JoinConfig in project hazelcast by hazelcast.

the class MemcachedMultiendpointTest method createConfig.

@Override
protected Config createConfig() {
    Config config = smallInstanceConfig();
    AdvancedNetworkConfig anc = config.getAdvancedNetworkConfig();
    anc.setEnabled(true).setMemcacheEndpointConfig(new ServerSocketEndpointConfig());
    // Join is disabled intentionally. will start standalone HazelcastInstances.
    JoinConfig join = anc.getJoin();
    join.getAutoDetectionConfig().setEnabled(false);
    join.getTcpIpConfig().setEnabled(false);
    return config;
}
Also used : AdvancedNetworkConfig(com.hazelcast.config.AdvancedNetworkConfig) Config(com.hazelcast.config.Config) JoinConfig(com.hazelcast.config.JoinConfig) AdvancedNetworkConfig(com.hazelcast.config.AdvancedNetworkConfig) ServerSocketEndpointConfig(com.hazelcast.config.ServerSocketEndpointConfig) JoinConfig(com.hazelcast.config.JoinConfig) ServerSocketEndpointConfig(com.hazelcast.config.ServerSocketEndpointConfig)

Example 74 with JoinConfig

use of com.hazelcast.config.JoinConfig in project hazelcast by hazelcast.

the class MemcachedTest method createConfig.

protected Config createConfig() {
    Config config = smallInstanceConfig();
    config.getNetworkConfig().getMemcacheProtocolConfig().setEnabled(true);
    // Join is disabled intentionally. will start standalone HazelcastInstances.
    JoinConfig join = config.getNetworkConfig().getJoin();
    join.getAutoDetectionConfig().setEnabled(false);
    join.getTcpIpConfig().setEnabled(false);
    return config;
}
Also used : JoinConfig(com.hazelcast.config.JoinConfig) Config(com.hazelcast.config.Config) JoinConfig(com.hazelcast.config.JoinConfig)

Example 75 with JoinConfig

use of com.hazelcast.config.JoinConfig in project hazelcast by hazelcast.

the class RestClusterBadRequestTest method getConfig.

@Override
protected Config getConfig() {
    Config config = smallInstanceConfig();
    RestApiConfig restApiConfig = config.getNetworkConfig().getRestApiConfig();
    restApiConfig.setEnabled(true);
    restApiConfig.enableAllGroups();
    JoinConfig joinConfig = config.getNetworkConfig().getJoin();
    joinConfig.getMulticastConfig().setEnabled(false);
    joinConfig.getTcpIpConfig().setEnabled(true).addMember("127.0.0.1");
    return config;
}
Also used : RestApiConfig(com.hazelcast.config.RestApiConfig) RestApiConfig(com.hazelcast.config.RestApiConfig) JoinConfig(com.hazelcast.config.JoinConfig) Config(com.hazelcast.config.Config) JoinConfig(com.hazelcast.config.JoinConfig)

Aggregations

JoinConfig (com.hazelcast.config.JoinConfig)90 Config (com.hazelcast.config.Config)64 NetworkConfig (com.hazelcast.config.NetworkConfig)32 Test (org.junit.Test)32 TcpIpConfig (com.hazelcast.config.TcpIpConfig)27 QuickTest (com.hazelcast.test.annotation.QuickTest)20 InterfacesConfig (com.hazelcast.config.InterfacesConfig)18 HazelcastInstance (com.hazelcast.core.HazelcastInstance)18 MulticastConfig (com.hazelcast.config.MulticastConfig)15 PartitionGroupConfig (com.hazelcast.config.PartitionGroupConfig)15 DiscoveryConfig (com.hazelcast.config.DiscoveryConfig)13 SlowTest (com.hazelcast.test.annotation.SlowTest)12 DiscoveryStrategyConfig (com.hazelcast.config.DiscoveryStrategyConfig)11 RealmConfig (com.hazelcast.config.security.RealmConfig)11 ClientConfig (com.hazelcast.client.config.ClientConfig)9 ListenerConfig (com.hazelcast.config.ListenerConfig)8 AwsConfig (com.hazelcast.config.AwsConfig)7 MemberAttributeConfig (com.hazelcast.config.MemberAttributeConfig)7 ServerSocketEndpointConfig (com.hazelcast.config.ServerSocketEndpointConfig)6 CountDownLatch (java.util.concurrent.CountDownLatch)6