Search in sources :

Example 6 with SplitBrainProtectionListenerConfig

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

the class MemberDomConfigProcessor method handleSplitBrainProtectionListeners.

protected void handleSplitBrainProtectionListeners(SplitBrainProtectionConfig splitBrainProtectionConfig, Node n) {
    for (Node listenerNode : childElements(n)) {
        if (matches("listener", cleanNodeName(listenerNode))) {
            String listenerClass = getTextContent(listenerNode);
            splitBrainProtectionConfig.addListenerConfig(new SplitBrainProtectionListenerConfig(listenerClass));
        }
    }
}
Also used : SplitBrainProtectionListenerConfig(com.hazelcast.config.SplitBrainProtectionListenerConfig) Node(org.w3c.dom.Node)

Example 7 with SplitBrainProtectionListenerConfig

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

the class SplitBrainProtectionListenerTest method configWithSplitBrainProtection.

private Config configWithSplitBrainProtection(String name, SplitBrainProtectionListener listener) {
    SplitBrainProtectionListenerConfig listenerConfig = new SplitBrainProtectionListenerConfig();
    listenerConfig.setImplementation(listener);
    Config config = new Config();
    config.addSplitBrainProtectionConfig(new SplitBrainProtectionConfig(name, true, 3).addListenerConfig(listenerConfig));
    return config;
}
Also used : SplitBrainProtectionListenerConfig(com.hazelcast.config.SplitBrainProtectionListenerConfig) SplitBrainProtectionConfig(com.hazelcast.config.SplitBrainProtectionConfig) Config(com.hazelcast.config.Config) SplitBrainProtectionListenerConfig(com.hazelcast.config.SplitBrainProtectionListenerConfig) SplitBrainProtectionConfig(com.hazelcast.config.SplitBrainProtectionConfig)

Aggregations

SplitBrainProtectionListenerConfig (com.hazelcast.config.SplitBrainProtectionListenerConfig)7 SplitBrainProtectionConfig (com.hazelcast.config.SplitBrainProtectionConfig)4 CachePartitionLostListenerConfig (com.hazelcast.config.CachePartitionLostListenerConfig)2 Config (com.hazelcast.config.Config)2 EntryListenerConfig (com.hazelcast.config.EntryListenerConfig)2 ItemListenerConfig (com.hazelcast.config.ItemListenerConfig)2 ListenerConfig (com.hazelcast.config.ListenerConfig)2 MapPartitionLostListenerConfig (com.hazelcast.config.MapPartitionLostListenerConfig)2 CachePartitionLostListener (com.hazelcast.cache.impl.event.CachePartitionLostListener)1 Member (com.hazelcast.cluster.Member)1 ItemListener (com.hazelcast.collection.ItemListener)1 AttributeConfig (com.hazelcast.config.AttributeConfig)1 AwsConfig (com.hazelcast.config.AwsConfig)1 AzureConfig (com.hazelcast.config.AzureConfig)1 BitmapIndexOptions (com.hazelcast.config.BitmapIndexOptions)1 CacheSimpleConfig (com.hazelcast.config.CacheSimpleConfig)1 CacheSimpleEntryListenerConfig (com.hazelcast.config.CacheSimpleEntryListenerConfig)1 CardinalityEstimatorConfig (com.hazelcast.config.CardinalityEstimatorConfig)1 DataPersistenceConfig (com.hazelcast.config.DataPersistenceConfig)1 DiscoveryConfig (com.hazelcast.config.DiscoveryConfig)1