Search in sources :

Example 11 with MergePolicyConfig

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

the class DynamicConfigXmlGenerator method multiMapXmlGenerator.

public static void multiMapXmlGenerator(ConfigXmlGenerator.XmlGenerator gen, Config config) {
    for (MultiMapConfig mm : config.getMultiMapConfigs().values()) {
        gen.open("multimap", "name", mm.getName()).node("backup-count", mm.getBackupCount()).node("async-backup-count", mm.getAsyncBackupCount()).node("statistics-enabled", mm.isStatisticsEnabled()).node("binary", mm.isBinary()).node("split-brain-protection-ref", mm.getSplitBrainProtectionName()).node("value-collection-type", mm.getValueCollectionType());
        entryListenerConfigXmlGenerator(gen, mm.getEntryListenerConfigs());
        MergePolicyConfig mergePolicyConfig = mm.getMergePolicyConfig();
        gen.node("merge-policy", mergePolicyConfig.getPolicy(), "batch-size", mergePolicyConfig.getBatchSize()).close();
    }
}
Also used : MergePolicyConfig(com.hazelcast.config.MergePolicyConfig) MultiMapConfig(com.hazelcast.config.MultiMapConfig)

Example 12 with MergePolicyConfig

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

the class MapMergeRunnable method getBatchSize.

@Override
protected int getBatchSize(String dataStructureName) {
    MapConfig mapConfig = getMapConfig(dataStructureName);
    MergePolicyConfig mergePolicyConfig = mapConfig.getMergePolicyConfig();
    return mergePolicyConfig.getBatchSize();
}
Also used : MergePolicyConfig(com.hazelcast.config.MergePolicyConfig) MapConfig(com.hazelcast.config.MapConfig)

Example 13 with MergePolicyConfig

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

the class MapMergeRunnable method getMergePolicy.

@Override
protected SplitBrainMergePolicy getMergePolicy(String dataStructureName) {
    MapConfig mapConfig = getMapConfig(dataStructureName);
    MergePolicyConfig mergePolicyConfig = mapConfig.getMergePolicyConfig();
    return mergePolicyProvider.getMergePolicy(mergePolicyConfig.getPolicy());
}
Also used : MergePolicyConfig(com.hazelcast.config.MergePolicyConfig) MapConfig(com.hazelcast.config.MapConfig)

Example 14 with MergePolicyConfig

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

the class ReplicatedMapMergeRunnable method getBatchSize.

@Override
protected int getBatchSize(String dataStructureName) {
    ReplicatedMapConfig replicatedMapConfig = getReplicatedMapConfig(dataStructureName);
    MergePolicyConfig mergePolicyConfig = replicatedMapConfig.getMergePolicyConfig();
    return mergePolicyConfig.getBatchSize();
}
Also used : MergePolicyConfig(com.hazelcast.config.MergePolicyConfig) ReplicatedMapConfig(com.hazelcast.config.ReplicatedMapConfig)

Example 15 with MergePolicyConfig

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

the class CardinalityEstimatorSplitBrainTest method config.

@Override
protected Config config() {
    MergePolicyConfig mergePolicyConfig = new MergePolicyConfig().setPolicy(mergePolicyClass.getName()).setBatchSize(10);
    Config config = super.config();
    config.getCardinalityEstimatorConfig(estimatorNameA).setBackupCount(1).setAsyncBackupCount(0).setMergePolicyConfig(mergePolicyConfig);
    config.getCardinalityEstimatorConfig(estimatorNameB).setBackupCount(1).setAsyncBackupCount(0).setMergePolicyConfig(mergePolicyConfig);
    return config;
}
Also used : MergePolicyConfig(com.hazelcast.config.MergePolicyConfig) Config(com.hazelcast.config.Config) MergePolicyConfig(com.hazelcast.config.MergePolicyConfig)

Aggregations

MergePolicyConfig (com.hazelcast.config.MergePolicyConfig)65 Config (com.hazelcast.config.Config)21 Test (org.junit.Test)20 ReplicatedMapConfig (com.hazelcast.config.ReplicatedMapConfig)18 MapConfig (com.hazelcast.config.MapConfig)17 MultiMapConfig (com.hazelcast.config.MultiMapConfig)17 EntryListenerConfig (com.hazelcast.config.EntryListenerConfig)16 ItemListenerConfig (com.hazelcast.config.ItemListenerConfig)16 QueueStoreConfig (com.hazelcast.config.QueueStoreConfig)15 RingbufferStoreConfig (com.hazelcast.config.RingbufferStoreConfig)15 ScheduledExecutorConfig (com.hazelcast.config.ScheduledExecutorConfig)15 CardinalityEstimatorConfig (com.hazelcast.config.CardinalityEstimatorConfig)13 EvictionConfig (com.hazelcast.config.EvictionConfig)13 ListenerConfig (com.hazelcast.config.ListenerConfig)13 QueueConfig (com.hazelcast.config.QueueConfig)13 RingbufferConfig (com.hazelcast.config.RingbufferConfig)13 EventJournalConfig (com.hazelcast.config.EventJournalConfig)12 ListConfig (com.hazelcast.config.ListConfig)12 MapPartitionLostListenerConfig (com.hazelcast.config.MapPartitionLostListenerConfig)12 SetConfig (com.hazelcast.config.SetConfig)12