Search in sources :

Example 6 with CardinalityEstimatorConfig

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);
}
Also used : DynamicConfigurationAwareConfig(com.hazelcast.internal.dynamicconfig.DynamicConfigurationAwareConfig) CardinalityEstimatorConfig(com.hazelcast.config.CardinalityEstimatorConfig)

Example 7 with 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;
}
Also used : MergePolicyConfig(com.hazelcast.config.MergePolicyConfig) CardinalityEstimatorConfig(com.hazelcast.config.CardinalityEstimatorConfig)

Example 8 with CardinalityEstimatorConfig

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);
}
Also used : CardinalityEstimatorConfig(com.hazelcast.config.CardinalityEstimatorConfig)

Example 9 with 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;
}
Also used : CardinalityEstimatorConfig(com.hazelcast.config.CardinalityEstimatorConfig)

Example 10 with CardinalityEstimatorConfig

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);
}
Also used : HazelcastInstance(com.hazelcast.core.HazelcastInstance) ListConfig(com.hazelcast.config.ListConfig) SetConfig(com.hazelcast.config.SetConfig) PNCounterConfig(com.hazelcast.config.PNCounterConfig) QueueConfig(com.hazelcast.config.QueueConfig) ReliableTopicConfig(com.hazelcast.config.ReliableTopicConfig) CacheSimpleConfig(com.hazelcast.config.CacheSimpleConfig) MapConfig(com.hazelcast.config.MapConfig) CardinalityEstimatorConfig(com.hazelcast.config.CardinalityEstimatorConfig) MultiMapConfig(com.hazelcast.config.MultiMapConfig) RingbufferConfig(com.hazelcast.config.RingbufferConfig) ExecutorConfig(com.hazelcast.config.ExecutorConfig) ScheduledExecutorConfig(com.hazelcast.config.ScheduledExecutorConfig) TopicConfig(com.hazelcast.config.TopicConfig) Config(com.hazelcast.config.Config) DurableExecutorConfig(com.hazelcast.config.DurableExecutorConfig) FlakeIdGeneratorConfig(com.hazelcast.config.FlakeIdGeneratorConfig) ReplicatedMapConfig(com.hazelcast.config.ReplicatedMapConfig) CardinalityEstimatorConfig(com.hazelcast.config.CardinalityEstimatorConfig) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Aggregations

CardinalityEstimatorConfig (com.hazelcast.config.CardinalityEstimatorConfig)16 CacheSimpleConfig (com.hazelcast.config.CacheSimpleConfig)5 DurableExecutorConfig (com.hazelcast.config.DurableExecutorConfig)5 ExecutorConfig (com.hazelcast.config.ExecutorConfig)5 FlakeIdGeneratorConfig (com.hazelcast.config.FlakeIdGeneratorConfig)5 ListConfig (com.hazelcast.config.ListConfig)5 MapConfig (com.hazelcast.config.MapConfig)5 MergePolicyConfig (com.hazelcast.config.MergePolicyConfig)5 MultiMapConfig (com.hazelcast.config.MultiMapConfig)5 PNCounterConfig (com.hazelcast.config.PNCounterConfig)5 QueueConfig (com.hazelcast.config.QueueConfig)5 ReliableTopicConfig (com.hazelcast.config.ReliableTopicConfig)5 ReplicatedMapConfig (com.hazelcast.config.ReplicatedMapConfig)5 RingbufferConfig (com.hazelcast.config.RingbufferConfig)5 ScheduledExecutorConfig (com.hazelcast.config.ScheduledExecutorConfig)5 SetConfig (com.hazelcast.config.SetConfig)5 TopicConfig (com.hazelcast.config.TopicConfig)5 Test (org.junit.Test)5 QuickTest (com.hazelcast.test.annotation.QuickTest)4 Config (com.hazelcast.config.Config)3