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));
}
}
}
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;
}
Aggregations