use of com.hazelcast.config.ReliableTopicConfig in project hazelcast by hazelcast.
the class MemberDomConfigProcessor method handleReliableTopic.
protected void handleReliableTopic(Node node) {
Node attName = getNamedItemNode(node, "name");
String name = getTextContent(attName);
ReliableTopicConfig topicConfig = new ReliableTopicConfig(name);
handleReliableTopicNode(node, topicConfig);
}
use of com.hazelcast.config.ReliableTopicConfig in project hazelcast by hazelcast.
the class YamlMemberDomConfigProcessor method handleReliableTopic.
@Override
protected void handleReliableTopic(Node node) {
for (Node topicNode : childElements(node)) {
ReliableTopicConfig topicConfig = new ReliableTopicConfig();
topicConfig.setName(topicNode.getNodeName());
handleReliableTopicNode(topicNode, topicConfig);
}
}
use of com.hazelcast.config.ReliableTopicConfig in project hazelcast by hazelcast.
the class DynamicConfigXmlGenerator method reliableTopicXmlGenerator.
public static void reliableTopicXmlGenerator(ConfigXmlGenerator.XmlGenerator gen, Config config) {
for (ReliableTopicConfig t : config.getReliableTopicConfigs().values()) {
gen.open("reliable-topic", "name", t.getName()).node("statistics-enabled", t.isStatisticsEnabled()).node("read-batch-size", t.getReadBatchSize()).node("topic-overload-policy", t.getTopicOverloadPolicy());
if (!t.getMessageListenerConfigs().isEmpty()) {
gen.open("message-listeners");
for (ListenerConfig lc : t.getMessageListenerConfigs()) {
gen.node("message-listener", classNameOrImplClass(lc.getClassName(), lc.getImplementation()));
}
gen.close();
}
gen.close();
}
}
use of com.hazelcast.config.ReliableTopicConfig in project hazelcast by hazelcast.
the class ConfigSearchTest method testReliableTopicConfig_Dynamic.
@Test
public void testReliableTopicConfig_Dynamic() {
TestCase<ReliableTopicConfig> testCase = new TestCase<ReliableTopicConfig>(new ReliableTopicConfig(STATIC_NAME), new ReliableTopicConfig(DYNAMIC_NAME), true) {
@Override
void addStaticConfig(Config config) {
config.addReliableTopicConfig(this.staticConfig);
}
@Override
void addDynamicConfig(HazelcastInstance hazelcastInstance) {
hazelcastInstance.getConfig().addReliableTopicConfig(this.dynamicConfig);
}
@Override
void asserts() {
ReliableTopicConfig dataConfig = hazelcastInstance.getConfig().findReliableTopicConfig(DYNAMIC_NAME);
assertThat(dataConfig.getName(), equalTo(DYNAMIC_NAME));
}
};
testTemplate(testCase);
}
use of com.hazelcast.config.ReliableTopicConfig in project hazelcast by hazelcast.
the class DynamicConfigTest method assertConfigurationsEqualOnAllMembers.
private void assertConfigurationsEqualOnAllMembers(ReliableTopicConfig reliableTopicConfig) {
String name = reliableTopicConfig.getName();
for (HazelcastInstance instance : members) {
ReliableTopicConfig registeredConfig = instance.getConfig().getReliableTopicConfig(name);
assertEquals(reliableTopicConfig, registeredConfig);
}
}
Aggregations