Search in sources :

Example 36 with JoinConfig

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

the class CacheClientListenerTest method getCachingProvider.

@Override
protected CachingProvider getCachingProvider() {
    Config config = new Config();
    JoinConfig joinConfig = config.getNetworkConfig().getJoin();
    joinConfig.getAwsConfig().setEnabled(false);
    joinConfig.getMulticastConfig().setEnabled(false);
    joinConfig.getTcpIpConfig().setEnabled(false);
    Hazelcast.newHazelcastInstance(config);
    Hazelcast.newHazelcastInstance(config);
    ClientConfig clientConfig = new ClientConfig();
    clientConfig.getNetworkConfig().addAddress("127.0.0.1");
    hazelcastInstance = HazelcastClient.newHazelcastClient(clientConfig);
    return HazelcastClientCachingProvider.createCachingProvider(hazelcastInstance);
}
Also used : Config(com.hazelcast.config.Config) JoinConfig(com.hazelcast.config.JoinConfig) ClientConfig(com.hazelcast.client.config.ClientConfig) JoinConfig(com.hazelcast.config.JoinConfig) ClientConfig(com.hazelcast.client.config.ClientConfig)

Example 37 with JoinConfig

use of com.hazelcast.config.JoinConfig 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

JoinConfig (com.hazelcast.config.JoinConfig)37 Config (com.hazelcast.config.Config)28 Test (org.junit.Test)20 NetworkConfig (com.hazelcast.config.NetworkConfig)19 QuickTest (com.hazelcast.test.annotation.QuickTest)19 InterfacesConfig (com.hazelcast.config.InterfacesConfig)14 TcpIpConfig (com.hazelcast.config.TcpIpConfig)11 HazelcastInstance (com.hazelcast.core.HazelcastInstance)11 ListenerConfig (com.hazelcast.config.ListenerConfig)9 PartitionGroupConfig (com.hazelcast.config.PartitionGroupConfig)9 ClientConfig (com.hazelcast.client.config.ClientConfig)8 MulticastConfig (com.hazelcast.config.MulticastConfig)8 MemberAttributeConfig (com.hazelcast.config.MemberAttributeConfig)6 AwsConfig (com.hazelcast.config.AwsConfig)5 DiscoveryConfig (com.hazelcast.config.DiscoveryConfig)5 Member (com.hazelcast.core.Member)5 ParallelTest (com.hazelcast.test.annotation.ParallelTest)5 CountDownLatch (java.util.concurrent.CountDownLatch)5 DiscoveryStrategyConfig (com.hazelcast.config.DiscoveryStrategyConfig)4 MembershipListener (com.hazelcast.core.MembershipListener)4