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