use of com.hazelcast.config.MergePolicyConfig in project hazelcast by hazelcast.
the class DynamicConfigXmlGenerator method cardinalityEstimatorXmlGenerator.
public static void cardinalityEstimatorXmlGenerator(ConfigXmlGenerator.XmlGenerator gen, Config config) {
for (CardinalityEstimatorConfig ex : config.getCardinalityEstimatorConfigs().values()) {
MergePolicyConfig mergePolicyConfig = ex.getMergePolicyConfig();
gen.open("cardinality-estimator", "name", ex.getName()).node("backup-count", ex.getBackupCount()).node("async-backup-count", ex.getAsyncBackupCount()).node("split-brain-protection-ref", ex.getSplitBrainProtectionName()).node("merge-policy", mergePolicyConfig.getPolicy(), "batch-size", mergePolicyConfig.getBatchSize()).close();
}
}
use of com.hazelcast.config.MergePolicyConfig in project hazelcast by hazelcast.
the class DynamicConfigXmlGenerator method ringbufferXmlGenerator.
public static void ringbufferXmlGenerator(ConfigXmlGenerator.XmlGenerator gen, Config config) {
Collection<RingbufferConfig> configs = config.getRingbufferConfigs().values();
for (RingbufferConfig rbConfig : configs) {
gen.open("ringbuffer", "name", rbConfig.getName()).node("capacity", rbConfig.getCapacity()).node("time-to-live-seconds", rbConfig.getTimeToLiveSeconds()).node("backup-count", rbConfig.getBackupCount()).node("async-backup-count", rbConfig.getAsyncBackupCount()).node("split-brain-protection-ref", rbConfig.getSplitBrainProtectionName()).node("in-memory-format", rbConfig.getInMemoryFormat());
RingbufferStoreConfig storeConfig = rbConfig.getRingbufferStoreConfig();
if (storeConfig != null) {
gen.open("ringbuffer-store", "enabled", storeConfig.isEnabled()).node("class-name", classNameOrImplClass(storeConfig.getClassName(), storeConfig.getStoreImplementation())).node("factory-class-name", classNameOrImplClass(storeConfig.getFactoryClassName(), storeConfig.getFactoryImplementation())).appendProperties(storeConfig.getProperties());
gen.close();
}
MergePolicyConfig mergePolicyConfig = rbConfig.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 DynamicConfigXmlGenerator method replicatedMapXmlGenerator.
public static void replicatedMapXmlGenerator(ConfigXmlGenerator.XmlGenerator gen, Config config) {
for (ReplicatedMapConfig r : config.getReplicatedMapConfigs().values()) {
MergePolicyConfig mergePolicyConfig = r.getMergePolicyConfig();
gen.open("replicatedmap", "name", r.getName()).node("in-memory-format", r.getInMemoryFormat()).node("async-fillup", r.isAsyncFillup()).node("statistics-enabled", r.isStatisticsEnabled()).node("split-brain-protection-ref", r.getSplitBrainProtectionName()).node("merge-policy", mergePolicyConfig.getPolicy(), "batch-size", mergePolicyConfig.getBatchSize());
if (!r.getListenerConfigs().isEmpty()) {
gen.open("entry-listeners");
for (ListenerConfig lc : r.getListenerConfigs()) {
gen.node("entry-listener", classNameOrImplClass(lc.getClassName(), lc.getImplementation()), "include-value", lc.isIncludeValue(), "local", lc.isLocal());
}
gen.close();
}
gen.close();
}
}
use of com.hazelcast.config.MergePolicyConfig in project hazelcast by hazelcast.
the class DynamicConfigXmlGenerator method queueXmlGenerator.
public static void queueXmlGenerator(ConfigXmlGenerator.XmlGenerator gen, Config config) {
Collection<QueueConfig> qCfgs = config.getQueueConfigs().values();
for (QueueConfig q : qCfgs) {
gen.open("queue", "name", q.getName()).node("priority-comparator-class-name", q.getPriorityComparatorClassName()).node("statistics-enabled", q.isStatisticsEnabled()).node("max-size", q.getMaxSize()).node("backup-count", q.getBackupCount()).node("async-backup-count", q.getAsyncBackupCount()).node("empty-queue-ttl", q.getEmptyQueueTtl());
appendItemListenerConfigs(gen, q.getItemListenerConfigs());
QueueStoreConfig storeConfig = q.getQueueStoreConfig();
if (storeConfig != null) {
gen.open("queue-store", "enabled", storeConfig.isEnabled()).node("class-name", classNameOrImplClass(storeConfig.getClassName(), storeConfig.getStoreImplementation())).node("factory-class-name", classNameOrImplClass(storeConfig.getFactoryClassName(), storeConfig.getFactoryImplementation())).appendProperties(storeConfig.getProperties()).close();
}
MergePolicyConfig mergePolicyConfig = q.getMergePolicyConfig();
gen.node("split-brain-protection-ref", q.getSplitBrainProtectionName()).node("merge-policy", mergePolicyConfig.getPolicy(), "batch-size", mergePolicyConfig.getBatchSize()).close();
}
}
use of com.hazelcast.config.MergePolicyConfig in project hazelcast by hazelcast.
the class DynamicConfigXmlGenerator method scheduledExecutorXmlGenerator.
public static void scheduledExecutorXmlGenerator(ConfigXmlGenerator.XmlGenerator gen, Config config) {
for (ScheduledExecutorConfig ex : config.getScheduledExecutorConfigs().values()) {
MergePolicyConfig mergePolicyConfig = ex.getMergePolicyConfig();
gen.open("scheduled-executor-service", "name", ex.getName()).node("pool-size", ex.getPoolSize()).node("durability", ex.getDurability()).node("capacity", ex.getCapacity()).node("capacity-policy", ex.getCapacityPolicy().name()).node("split-brain-protection-ref", ex.getSplitBrainProtectionName()).node("merge-policy", mergePolicyConfig.getPolicy(), "batch-size", mergePolicyConfig.getBatchSize()).node("statistics-enabled", ex.isStatisticsEnabled()).close();
}
}
Aggregations