
com.foreach.across.modules.ehcache.EhcacheModuleSettings Maven / Gradle / Ivy
/*
* Copyright 2014 the original author or authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.foreach.across.modules.ehcache;
import net.sf.ehcache.config.Configuration;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
@ConfigurationProperties("ehcache-module")
public class EhcacheModuleSettings
{
public static final String CONFIGURATION_RESOURCE = "ehcache-module.configuration-resource";
public static final String CONFIGURATION_OBJECT = "ehcache-module.configuration-object";
public static final String CACHE_MANAGER_IS_SHARED = "ehcache-module.cache-manager-is-shared";
public static final String CACHE_MANAGER_NAME = "ehcache-module.cache-manager-name";
/**
* Resource representing the ehcache XML configuration file (defaults to: ehcache.xml).
*/
private Resource configurationResource = new ClassPathResource( "ehcache.xml" );
/**
* Configuration class instance.
*/
private Configuration configurationObject;
/**
* Should the created CacheManager be shared at the ClassLoader level.
*/
private Boolean cacheManagerIsShared = true;
/**
* Name of the CacheManager instance.
*/
private String cacheManagerName;
public Resource getConfigurationResource() {
return configurationResource;
}
public void setConfigurationResource( Resource configurationResource ) {
this.configurationResource = configurationResource;
}
public Configuration getConfigurationObject() {
return configurationObject;
}
public void setConfigurationObject( Configuration configurationObject ) {
this.configurationObject = configurationObject;
}
public Boolean getCacheManagerIsShared() {
return cacheManagerIsShared;
}
public void setCacheManagerIsShared( Boolean cacheManagerIsShared ) {
this.cacheManagerIsShared = cacheManagerIsShared;
}
public String getCacheManagerName() {
return cacheManagerName;
}
public void setCacheManagerName( String cacheManagerName ) {
this.cacheManagerName = cacheManagerName;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy