use of com.hazelcast.config.CardinalityEstimatorConfig in project hazelcast by hazelcast.
the class AddCardinalityEstimatorConfigMessageTask method checkStaticConfigDoesNotExist.
@Override
protected boolean checkStaticConfigDoesNotExist(IdentifiedDataSerializable config) {
DynamicConfigurationAwareConfig nodeConfig = (DynamicConfigurationAwareConfig) nodeEngine.getConfig();
CardinalityEstimatorConfig cardinalityEstimatorConfig = (CardinalityEstimatorConfig) config;
return nodeConfig.checkStaticConfigDoesNotExist(nodeConfig.getStaticConfig().getCardinalityEstimatorConfigs(), cardinalityEstimatorConfig.getName(), cardinalityEstimatorConfig);
}
use of com.hazelcast.config.CardinalityEstimatorConfig in project hazelcast by hazelcast.
the class AddCardinalityEstimatorConfigMessageTask method getConfig.
@Override
protected IdentifiedDataSerializable getConfig() {
CardinalityEstimatorConfig config = new CardinalityEstimatorConfig(parameters.name, parameters.backupCount, parameters.asyncBackupCount);
MergePolicyConfig mergePolicyConfig = mergePolicyConfig(parameters.mergePolicy, parameters.mergeBatchSize);
config.setMergePolicyConfig(mergePolicyConfig);
return config;
}
use of com.hazelcast.config.CardinalityEstimatorConfig in project hazelcast by hazelcast.
the class MemberDomConfigProcessor method handleCardinalityEstimator.
protected void handleCardinalityEstimator(Node node) {
CardinalityEstimatorConfig cardinalityEstimatorConfig = ConfigUtils.getByNameOrNew(config.getCardinalityEstimatorConfigs(), getTextContent(getNamedItemNode(node, "name")), CardinalityEstimatorConfig.class);
handleCardinalityEstimatorNode(node, cardinalityEstimatorConfig);
}
use of com.hazelcast.config.CardinalityEstimatorConfig in project hazelcast by hazelcast.
the class AbstractSplitBrainProtectionTest method newEstimatorConfig.
protected static CardinalityEstimatorConfig newEstimatorConfig(SplitBrainProtectionOn splitBrainProtectionOn, String splitBrainProtectionName) {
CardinalityEstimatorConfig config = new CardinalityEstimatorConfig(ESTIMATOR_NAME + splitBrainProtectionOn.name());
config.setSplitBrainProtectionName(splitBrainProtectionName);
return config;
}
use of com.hazelcast.config.CardinalityEstimatorConfig in project hazelcast by hazelcast.
the class ConfigSearchTest method testCardinalityEstimatorConfig_Static.
@Test
public void testCardinalityEstimatorConfig_Static() {
TestCase<CardinalityEstimatorConfig> testCase = new TestCase<CardinalityEstimatorConfig>(new CardinalityEstimatorConfig().setName(STATIC_NAME), new CardinalityEstimatorConfig().setName(DYNAMIC_NAME), false) {
@Override
void addStaticConfig(Config config) {
config.addCardinalityEstimatorConfig(this.staticConfig);
}
@Override
void addDynamicConfig(HazelcastInstance hazelcastInstance) {
hazelcastInstance.getConfig().addCardinalityEstimatorConfig(this.dynamicConfig);
}
@Override
void asserts() {
CardinalityEstimatorConfig dataConfig = hazelcastInstance.getConfig().findCardinalityEstimatorConfig(DYNAMIC_NAME);
assertThat(dataConfig.getName(), equalTo(STATIC_NAME));
}
};
testTemplate(testCase);
}
Aggregations