Package net.sf.ehcache.config.generator.model

Examples of net.sf.ehcache.config.generator.model.SimpleNodeAttribute


    private void init() {
        if (cacheWriterConfiguration == null) {
            return;
        }
        addAttribute(new SimpleNodeAttribute("minWriteDelay", cacheWriterConfiguration.getMinWriteDelay()).optional(true).defaultValue(
                CacheWriterConfiguration.DEFAULT_MIN_WRITE_DELAY));
        addAttribute(new SimpleNodeAttribute("writeMode", cacheWriterConfiguration.getWriteMode()).optional(true).defaultValue(
                CacheWriterConfiguration.DEFAULT_WRITE_MODE));
        addAttribute(new SimpleNodeAttribute("writeBatchSize", cacheWriterConfiguration.getWriteBatchSize()).optional(true).defaultValue(
                CacheWriterConfiguration.DEFAULT_WRITE_BATCH_SIZE));
        addAttribute(new SimpleNodeAttribute("maxWriteDelay", cacheWriterConfiguration.getMaxWriteDelay()).optional(true).defaultValue(
                CacheWriterConfiguration.DEFAULT_MAX_WRITE_DELAY));
        addAttribute(new SimpleNodeAttribute("retryAttempts", cacheWriterConfiguration.getRetryAttempts()).optional(true).defaultValue(
                CacheWriterConfiguration.DEFAULT_RETRY_ATTEMPTS));
        addAttribute(new SimpleNodeAttribute("rateLimitPerSecond", cacheWriterConfiguration.getRateLimitPerSecond()).optional(true)
                .defaultValue(CacheWriterConfiguration.DEFAULT_RATE_LIMIT_PER_SECOND));
        addAttribute(new SimpleNodeAttribute("writeBatching", cacheWriterConfiguration.getWriteBatching()).optional(true).defaultValue(
                CacheWriterConfiguration.DEFAULT_WRITE_BATCHING));
        addAttribute(new SimpleNodeAttribute("writeCoalescing", cacheWriterConfiguration.getWriteCoalescing()).optional(true).defaultValue(
                CacheWriterConfiguration.DEFAULT_WRITE_COALESCING));
        addAttribute(new SimpleNodeAttribute("notifyListenersOnException", cacheWriterConfiguration.getNotifyListenersOnException())
                .optional(true).defaultValue(CacheWriterConfiguration.DEFAULT_NOTIFY_LISTENERS_ON_EXCEPTION));
        addAttribute(new SimpleNodeAttribute("retryAttemptDelaySeconds", cacheWriterConfiguration.getRetryAttemptDelaySeconds()).optional(
                true).defaultValue(CacheWriterConfiguration.DEFAULT_RETRY_ATTEMPT_DELAY_SECONDS));
        addAttribute(new SimpleNodeAttribute("writeBehindConcurrency", cacheWriterConfiguration.getWriteBehindConcurrency()).optional(
                true).defaultValue(CacheWriterConfiguration.DEFAULT_WRITE_BEHIND_CONCURRENCY));
        addAttribute(new SimpleNodeAttribute("writeBehindMaxQueueSize", cacheWriterConfiguration.getWriteBehindMaxQueueSize()).optional(
                true).defaultValue(CacheWriterConfiguration.DEFAULT_WRITE_BEHIND_MAX_QUEUE_SIZE));

        CacheWriterFactoryConfiguration cacheWriterFactoryConfiguration = cacheWriterConfiguration.getCacheWriterFactoryConfiguration();
        if (cacheWriterFactoryConfiguration != null) {
            addChildElement(new FactoryConfigurationElement(this, "cacheWriterFactory", cacheWriterFactoryConfiguration));
View Full Code Here


    private void init() {
        for (SearchAttribute sa : searchable.getUserDefinedSearchAttributes().values()) {
            addChildElement(sa.asConfigElement(this));
        }

        addAttribute(new SimpleNodeAttribute("keys", searchable.keys()).optional(true).defaultValue(Searchable.KEYS_DEFAULT));
        addAttribute(new SimpleNodeAttribute("values", searchable.values()).optional(true).defaultValue(Searchable.VALUES_DEFAULT));
    }
View Full Code Here

            return;
        }
        if (nonstopConfiguration.getTimeoutBehavior() != null && !isDefault(nonstopConfiguration.getTimeoutBehavior())) {
            addChildElement(new TimeoutBehaviorConfigurationElement(this, nonstopConfiguration.getTimeoutBehavior()));
        }
        addAttribute(new SimpleNodeAttribute("enabled", nonstopConfiguration.isEnabled()).optional(true).defaultValue(
                NonstopConfiguration.DEFAULT_ENABLED));
        addAttribute(new SimpleNodeAttribute("immediateTimeout", nonstopConfiguration.isImmediateTimeout()).optional(true).defaultValue(
                NonstopConfiguration.DEFAULT_IMMEDIATE_TIMEOUT));
        addAttribute(new SimpleNodeAttribute("timeoutMillis", nonstopConfiguration.getTimeoutMillis()).optional(true).defaultValue(
                NonstopConfiguration.DEFAULT_TIMEOUT_MILLIS));
    }
View Full Code Here

    private void init() {
        if (copyStrategyConfiguration == null) {
            return;
        }
        addAttribute(new SimpleNodeAttribute("class", copyStrategyConfiguration.getClassName()).optional(false));
    }
View Full Code Here

    private void init() {
        if (factoryConfiguration == null) {
            return;
        }
        addAttribute(new SimpleNodeAttribute("class", factoryConfiguration.getFullyQualifiedClassPath()).optional(false));
        addAttribute(new SimpleNodeAttribute("properties", factoryConfiguration.getProperties()).optional(true));
        addAttribute(new SimpleNodeAttribute("propertySeparator", factoryConfiguration.getPropertySeparator()).optional(true));
    }
View Full Code Here

            return;
        }
        if (tcConfiguration.getNonstopConfiguration() != null) {
            this.addChildElement(new NonstopConfigurationElement(this, tcConfiguration.getNonstopConfiguration()));
        }
        addAttribute(new SimpleNodeAttribute("clustered", tcConfiguration.isClustered()).optional(true).defaultValue(
                TerracottaConfiguration.DEFAULT_CLUSTERED));
        addAttribute(new SimpleNodeAttribute("valueMode", tcConfiguration.getValueMode()).optional(true).defaultValue(
                TerracottaConfiguration.DEFAULT_VALUE_MODE));
        addAttribute(new SimpleNodeAttribute("consistency", tcConfiguration.getConsistency().name()).optional(true).defaultValue(
                TerracottaConfiguration.DEFAULT_CONSISTENCY_TYPE.name()));
        addAttribute(new SimpleNodeAttribute("synchronousWrites", tcConfiguration.isSynchronousWrites()).optional(true).defaultValue(
                TerracottaConfiguration.DEFAULT_SYNCHRONOUS_WRITES));
        addAttribute(new SimpleNodeAttribute("copyOnRead", tcConfiguration.isCopyOnRead()).optional(true).defaultValue(
                TerracottaConfiguration.DEFAULT_COPY_ON_READ));
        addAttribute(new SimpleNodeAttribute("localKeyCache", tcConfiguration.getLocalKeyCache()).optional(true).defaultValue(
                TerracottaConfiguration.DEFAULT_LOCAL_KEY_CACHE));
        addAttribute(new SimpleNodeAttribute("localKeyCacheSize", tcConfiguration.getLocalKeyCacheSize()).optional(true).defaultValue(
                TerracottaConfiguration.DEFAULT_LOCAL_KEY_CACHE_SIZE));
        addAttribute(new SimpleNodeAttribute("orphanEviction", tcConfiguration.getOrphanEviction()).optional(true).defaultValue(
                TerracottaConfiguration.DEFAULT_ORPHAN_EVICTION));
        addAttribute(new SimpleNodeAttribute("orphanEvictionPeriod", tcConfiguration.getOrphanEvictionPeriod()).optional(true)
                .defaultValue(TerracottaConfiguration.DEFAULT_ORPHAN_EVICTION_PERIOD));
        addAttribute(new SimpleNodeAttribute("coherentReads", tcConfiguration.getCoherentReads()).optional(true).defaultValue(
                TerracottaConfiguration.DEFAULT_COHERENT_READS));
        addAttribute(new SimpleNodeAttribute("storageStrategy", tcConfiguration.getStorageStrategy()).optional(true).defaultValue(
                TerracottaConfiguration.DEFAULT_STORAGE_STRATEGY));
        addAttribute(new SimpleNodeAttribute("concurrency", tcConfiguration.getConcurrency()).optional(true).defaultValue(
                TerracottaConfiguration.DEFAULT_CONCURRENCY));
    }
View Full Code Here

    private void init() {
        if (timeoutBehaviorConfiguration == null) {
            return;
        }
        addAttribute(new SimpleNodeAttribute("type", timeoutBehaviorConfiguration.getType()).optional(true).defaultValue(
                TimeoutBehaviorConfiguration.DEFAULT_VALUE));
        addAttribute(new SimpleNodeAttribute("properties", timeoutBehaviorConfiguration.getProperties()).optional(true).defaultValue(
                TimeoutBehaviorConfiguration.DEFAULT_PROPERTIES));
        addAttribute(new SimpleNodeAttribute("propertySeparator", timeoutBehaviorConfiguration.getPropertySeparator()).optional(true)
                .defaultValue(TimeoutBehaviorConfiguration.DEFAULT_PROPERTY_SEPARATOR));
    }
View Full Code Here

    private void init() {
        if (configuration == null) {
            return;
        }
        // add the attributes
        addAttribute(new SimpleNodeAttribute("name", configuration.getName()).optional(true));
        addAttribute(new SimpleNodeAttribute("updateCheck", configuration.getUpdateCheck()).optional(true).defaultValue(
                String.valueOf(Configuration.DEFAULT_UPDATE_CHECK)));
        addAttribute(new SimpleNodeAttribute("monitoring", configuration.getMonitoring()).optional(true).defaultValue(
                Configuration.DEFAULT_MONITORING.name().toLowerCase()));
        addAttribute(new SimpleNodeAttribute("dynamicConfig", configuration.getDynamicConfig()).optional(true).defaultValue(
                String.valueOf(Configuration.DEFAULT_DYNAMIC_CONFIG)));
        addAttribute(new SimpleNodeAttribute("defaultTransactionTimeoutInSeconds", configuration.getDefaultTransactionTimeoutInSeconds())
                .optional(true).defaultValue(String.valueOf(Configuration.DEFAULT_TRANSACTION_TIMEOUT)));

        // add the child elements
        DiskStoreConfiguration diskStoreConfiguration = configuration.getDiskStoreConfiguration();
        if (diskStoreConfiguration != null) {
View Full Code Here

    private void init() {
        if (diskStoreConfiguration == null) {
            return;
        }
        addAttribute(new SimpleNodeAttribute("path", diskStoreConfiguration.getOriginalPath()).optional(true));
    }
View Full Code Here

    private void init() {
        if (elementValueComparatorConfiguration == null) {
            return;
        }
        addAttribute(new SimpleNodeAttribute("class", elementValueComparatorConfiguration.getClassName()).optional(false));
    }
View Full Code Here

TOP

Related Classes of net.sf.ehcache.config.generator.model.SimpleNodeAttribute

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.