Search in sources :

Example 31 with NetworkConfig

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

the class NodeExtensionTest method getConfig.

protected Config getConfig() {
    Config config = new Config();
    NetworkConfig networkConfig = config.getNetworkConfig();
    JoinConfig join = networkConfig.getJoin();
    join.getMulticastConfig().setEnabled(false);
    return config;
}
Also used : Config(com.hazelcast.config.Config) NetworkConfig(com.hazelcast.config.NetworkConfig) JoinConfig(com.hazelcast.config.JoinConfig) NetworkConfig(com.hazelcast.config.NetworkConfig) JoinConfig(com.hazelcast.config.JoinConfig)

Example 32 with NetworkConfig

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

the class MapWordCountAggregationPerformanceTest method buildCluster.

private static HazelcastInstance buildCluster(int memberCount) {
    Config config = new Config();
    NetworkConfig networkConfig = config.getNetworkConfig();
    networkConfig.getJoin().getMulticastConfig().setEnabled(false);
    networkConfig.getJoin().getTcpIpConfig().setEnabled(true);
    networkConfig.getJoin().getTcpIpConfig().setMembers(singletonList("127.0.0.1"));
    MapConfig mapConfig = new MapConfig();
    mapConfig.setInMemoryFormat(InMemoryFormat.OBJECT);
    mapConfig.setName(MAP_NAME);
    mapConfig.setBackupCount(0);
    config.addMapConfig(mapConfig);
    config.setProperty("hazelcast.query.predicate.parallel.evaluation", "true");
    config.setProperty("hazelcast.aggregation.accumulation.parallel.evaluation", "true");
    HazelcastInstance[] hazelcastInstances = new HazelcastInstance[memberCount];
    for (int i = 0; i < memberCount; i++) {
        hazelcastInstances[i] = Hazelcast.newHazelcastInstance(config);
    }
    return hazelcastInstances[0];
}
Also used : HazelcastInstance(com.hazelcast.core.HazelcastInstance) Config(com.hazelcast.config.Config) MapConfig(com.hazelcast.config.MapConfig) NetworkConfig(com.hazelcast.config.NetworkConfig) NetworkConfig(com.hazelcast.config.NetworkConfig) MapConfig(com.hazelcast.config.MapConfig)

Example 33 with NetworkConfig

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

the class PartitionServiceBeanDTOTest method getConfig.

@Override
protected Config getConfig() {
    Config config = new Config();
    // Join is disabled intentionally. will start standalone HazelcastInstance.
    NetworkConfig networkConfig = config.getNetworkConfig();
    JoinConfig join = networkConfig.getJoin();
    join.getMulticastConfig().setEnabled(false);
    join.getTcpIpConfig().setEnabled(false);
    return config;
}
Also used : Config(com.hazelcast.config.Config) NetworkConfig(com.hazelcast.config.NetworkConfig) JoinConfig(com.hazelcast.config.JoinConfig) NetworkConfig(com.hazelcast.config.NetworkConfig) JoinConfig(com.hazelcast.config.JoinConfig)

Aggregations

NetworkConfig (com.hazelcast.config.NetworkConfig)33 Config (com.hazelcast.config.Config)25 JoinConfig (com.hazelcast.config.JoinConfig)23 Test (org.junit.Test)13 InterfacesConfig (com.hazelcast.config.InterfacesConfig)10 TcpIpConfig (com.hazelcast.config.TcpIpConfig)10 QuickTest (com.hazelcast.test.annotation.QuickTest)10 ListenerConfig (com.hazelcast.config.ListenerConfig)8 PartitionGroupConfig (com.hazelcast.config.PartitionGroupConfig)8 HazelcastInstance (com.hazelcast.core.HazelcastInstance)8 HazelcastInstanceFactory.newHazelcastInstance (com.hazelcast.instance.HazelcastInstanceFactory.newHazelcastInstance)6 MembershipEvent (com.hazelcast.core.MembershipEvent)4 Node (com.hazelcast.instance.Node)4 UnknownHostException (java.net.UnknownHostException)4 CountDownLatch (java.util.concurrent.CountDownLatch)4 MulticastConfig (com.hazelcast.config.MulticastConfig)3 MembershipAdapter (com.hazelcast.core.MembershipAdapter)3 FirewallingTcpIpConnectionManager (com.hazelcast.nio.tcp.FirewallingTcpIpConnectionManager)3 NightlyTest (com.hazelcast.test.annotation.NightlyTest)3 MapConfig (com.hazelcast.config.MapConfig)2