本文整理了Java中net.sf.ehcache.config.Configuration.checkDynChange()
方法的一些代码示例,展示了Configuration.checkDynChange()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.checkDynChange()
方法的具体详情如下:
包路径:net.sf.ehcache.config.Configuration
类名称:Configuration
方法名:checkDynChange
暂无
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* @param defaultCacheConfiguration
*/
public final void setDefaultCacheConfiguration(CacheConfiguration defaultCacheConfiguration) {
final String prop = "defaultCacheConfiguration";
final boolean publish = checkDynChange(prop);
final CacheConfiguration oldValue = this.defaultCacheConfiguration;
this.defaultCacheConfiguration = defaultCacheConfiguration;
if (publish) {
firePropertyChange(prop, oldValue, defaultCacheConfiguration);
}
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* Allows BeanHandler to set the default transaction timeout.
*/
public final void setDefaultTransactionTimeoutInSeconds(int defaultTransactionTimeoutInSeconds) {
final String prop = "defaultTransactionTimeoutInSeconds";
final boolean publish = checkDynChange(prop);
final int oldValue = this.defaultTransactionTimeoutInSeconds;
this.defaultTransactionTimeoutInSeconds = defaultTransactionTimeoutInSeconds;
if (publish) {
firePropertyChange(prop, oldValue, defaultTransactionTimeoutInSeconds);
}
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* Allows BeanHandler to set the dynamic configuration flag
*/
public final void setDynamicConfig(boolean dynamicConfig) {
final String prop = "dynamicConfig";
final boolean publish = checkDynChange(prop);
final boolean oldValue = this.dynamicConfig;
this.dynamicConfig = dynamicConfig;
if (publish) {
firePropertyChange(prop, oldValue, dynamicConfig);
}
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* Allows BeanHandler to add the CacheManagerEventListener to the configuration.
*/
public final void addCacheManagerEventListenerFactory(FactoryConfiguration cacheManagerEventListenerFactoryConfiguration) {
final String prop = "cacheManagerEventListenerFactoryConfiguration";
boolean publish = checkDynChange(prop);
if (this.cacheManagerEventListenerFactoryConfiguration == null) {
this.cacheManagerEventListenerFactoryConfiguration = cacheManagerEventListenerFactoryConfiguration;
if (publish) {
firePropertyChange(prop, null, cacheManagerEventListenerFactoryConfiguration);
}
}
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* Adds a CacheManagerPeerListener through FactoryConfiguration.
*/
public final void addCacheManagerPeerListenerFactory(FactoryConfiguration factory) {
final String prop = "cacheManagerPeerListenerFactoryConfiguration";
boolean publish = checkDynChange(prop);
List<FactoryConfiguration> oldValue = null;
if (publish) {
oldValue = new ArrayList<FactoryConfiguration>(cacheManagerPeerListenerFactoryConfiguration);
}
cacheManagerPeerListenerFactoryConfiguration.add(factory);
if (publish) {
firePropertyChange(prop, oldValue, cacheManagerPeerListenerFactoryConfiguration);
}
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* Sets the configuration source.
*
* @param configurationSource
* an informative description of the source, preferably
* including the resource name and location.
*/
public final void setSource(ConfigurationSource configurationSource) {
final String prop = "configurationSource";
final boolean publish = checkDynChange(prop);
final ConfigurationSource oldValue = this.configurationSource;
this.configurationSource = configurationSource;
if (publish) {
firePropertyChange(prop, oldValue, configurationSource);
}
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* Adds a CacheManagerPeerProvider through FactoryConfiguration.
*/
public final void addCacheManagerPeerProviderFactory(FactoryConfiguration factory) {
final String prop = "cacheManagerPeerProviderFactoryConfiguration";
boolean publish = checkDynChange(prop);
List<FactoryConfiguration> oldValue = null;
if (publish) {
oldValue = new ArrayList<FactoryConfiguration>(cacheManagerPeerProviderFactoryConfiguration);
}
cacheManagerPeerProviderFactoryConfiguration.add(factory);
if (publish) {
firePropertyChange(prop, oldValue, cacheManagerPeerProviderFactoryConfiguration);
}
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* Builder to set the monitoring approach
*
* @param monitoring
* an non-null instance of {@link Monitoring}
* @return this configuration instance
*/
public final Configuration monitoring(Monitoring monitoring) {
if (null == monitoring) {
throw new IllegalArgumentException("Monitoring value must be non-null");
}
final String prop = "monitoring";
final boolean publish = checkDynChange(prop);
final Monitoring oldValue = this.monitoring;
this.monitoring = monitoring;
if (publish) {
firePropertyChange(prop, oldValue, monitoring);
}
return this;
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* Sets the maximum amount of bytes the cache manager being configured will use on the OnHeap tier
* @param maxBytesOnHeap amount of bytes
*/
public void setMaxBytesLocalHeap(final Long maxBytesOnHeap) {
final String prop = "maxBytesLocalHeap";
verifyGreaterThanZero(maxBytesOnHeap, prop);
final boolean publish = checkDynChange(prop);
Long oldValue = this.maxBytesLocalHeap;
this.maxBytesLocalHeap = maxBytesOnHeap;
if (publish) {
firePropertyChange(prop, oldValue, maxBytesOnHeap);
}
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* Sets maximum amount of bytes the CacheManager will use on the Disk Tier.
* @param maxBytesOnDisk max bytes on disk in bytes. Needs be be greater than 0
*/
public void setMaxBytesLocalDisk(final Long maxBytesOnDisk) {
String prop = "maxBytesLocalDisk";
verifyGreaterThanZero(maxBytesOnDisk, prop);
boolean publish = checkDynChange(prop);
Long oldValue = this.maxBytesLocalDisk;
this.maxBytesLocalDisk = maxBytesOnDisk;
if (publish) {
firePropertyChange(prop, oldValue, maxBytesOnDisk);
}
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* Allows BeanHandler to add disk store location to the configuration.
*/
public final void addDiskStore(DiskStoreConfiguration diskStoreConfigurationParameter) throws ObjectExistsException {
if (diskStoreConfiguration != null) {
throw new ObjectExistsException("The Disk Store has already been configured");
}
final String prop = "diskStoreConfiguration";
boolean publish = checkDynChange(prop);
DiskStoreConfiguration oldValue = diskStoreConfiguration;
diskStoreConfiguration = diskStoreConfigurationParameter;
if (publish) {
firePropertyChange(prop, oldValue, diskStoreConfiguration);
}
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* Sets maximum amount of bytes the CacheManager will use on the OffHeap Tier.
* @param maxBytesOffHeap max bytes on disk in bytes. Needs be be greater than 0
*/
public void setMaxBytesLocalOffHeap(final Long maxBytesOffHeap) {
String prop = "maxBytesLocalOffHeap";
verifyGreaterThanZero(maxBytesOffHeap, prop);
boolean publish = checkDynChange(prop);
Long oldValue = this.maxBytesLocalOffHeap;
this.maxBytesLocalOffHeap = maxBytesOffHeap;
if (publish) {
firePropertyChange(prop, oldValue, maxBytesOffHeap);
}
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* Allows BeanHandler to add a Terracotta configuration to the configuration
*/
public final void addTerracottaConfig(TerracottaClientConfiguration terracottaConfiguration) throws ObjectExistsException {
if (this.terracottaConfigConfiguration != null && terracottaConfiguration != null) {
throw new ObjectExistsException("The TerracottaConfig has already been configured");
}
final String prop = "terracottaConfigConfiguration";
final boolean publish = checkDynChange(prop);
final TerracottaClientConfiguration oldValue = this.terracottaConfigConfiguration;
this.terracottaConfigConfiguration = terracottaConfiguration;
if (publish) {
firePropertyChange(prop, oldValue, terracottaConfiguration);
}
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* Allows BeanHandler to add transaction manager lookup to the configuration.
*/
public final void addTransactionManagerLookup(FactoryConfiguration transactionManagerLookupParameter) throws ObjectExistsException {
if (transactionManagerLookupConfiguration != null) {
throw new ObjectExistsException("The TransactionManagerLookup class has already been configured");
}
final String prop = "transactionManagerLookupConfiguration";
boolean publish = checkDynChange(prop);
FactoryConfiguration oldValue = this.transactionManagerLookupConfiguration;
transactionManagerLookupConfiguration = transactionManagerLookupParameter;
if (publish) {
firePropertyChange(prop, oldValue, transactionManagerLookupParameter);
}
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* Allows BeanHandler to add a ManagementRESTService configuration to the configuration
*/
public final void addManagementRESTService(ManagementRESTServiceConfiguration managementRESTServiceConfiguration) throws ObjectExistsException {
if (this.managementRESTService != null) {
throw new ObjectExistsException("The ManagementRESTService has already been configured");
}
final String prop = "managementRESTService";
final boolean publish = checkDynChange(prop);
final ManagementRESTServiceConfiguration oldValue = this.managementRESTService;
this.managementRESTService = managementRESTServiceConfiguration;
if (publish) {
firePropertyChange(prop, oldValue, managementRESTServiceConfiguration);
}
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* Maintains the known Cache's configuration map in this Configuration
* @param cacheConfiguration the CacheConfiguration
* @param strict true if added regularly, validation dyn config constraints, false if added through the cache being added
*/
void addCache(CacheConfiguration cacheConfiguration, final boolean strict) throws ObjectExistsException {
final String prop = "cacheConfigurations";
Object oldValue = null;
boolean publishChange = strict && checkDynChange(prop);
if (publishChange) {
oldValue = new HashMap<String, CacheConfiguration>(cacheConfigurations);
}
if (cacheConfigurations.get(cacheConfiguration.name) != null) {
throw new ObjectExistsException("Cannot create cache: " + cacheConfiguration.name + " with the same name as an existing one.");
}
if (cacheConfiguration.name.equalsIgnoreCase(net.sf.ehcache.Cache.DEFAULT_CACHE_NAME)) {
throw new ObjectExistsException("The Default Cache has already been configured");
}
cacheConfigurations.put(cacheConfiguration.name, cacheConfiguration);
if (publishChange) {
firePropertyChange(prop, oldValue, cacheConfigurations);
}
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* Allows BeanHandler to set the CacheManager name.
* <p>
* Cache manager names have constraints on the characters they can use:
* <ul>
* <li>cache managers that are registered as MBeans must obey the {@link javax.management.ObjectName} rules for unquoted value.
* This means the following characters are illegal: ',', '=', ':', '"', '*' and '?'.</li>
* </ul>
* Note that a clustered cache manager is by default registered as MBean.
*/
public final void setName(String name) {
assertArgumentNotNull("name", name);
final String prop = "cacheManagerName";
final boolean publishChange = checkDynChange(prop);
String oldValue = this.cacheManagerName;
this.cacheManagerName = name;
if (publishChange) {
firePropertyChange(prop, oldValue, name);
}
}
代码示例来源:origin: net.sf.ehcache.internal/ehcache-core
/**
* @param defaultCacheConfiguration
*/
public final void setDefaultCacheConfiguration(CacheConfiguration defaultCacheConfiguration) {
final String prop = "defaultCacheConfiguration";
final boolean publish = checkDynChange(prop);
final CacheConfiguration oldValue = this.defaultCacheConfiguration;
this.defaultCacheConfiguration = defaultCacheConfiguration;
if (publish) {
firePropertyChange(prop, oldValue, defaultCacheConfiguration);
}
}
代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache
/**
* Allows BeanHandler to set the dynamic configuration flag
*/
public final void setDynamicConfig(boolean dynamicConfig) {
final String prop = "dynamicConfig";
final boolean publish = checkDynChange(prop);
final boolean oldValue = this.dynamicConfig;
this.dynamicConfig = dynamicConfig;
if (publish) {
firePropertyChange(prop, oldValue, dynamicConfig);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
/**
* Allows BeanHandler to set the updateCheck flag.
*/
public final void setUpdateCheck(boolean updateCheck) {
String prop = "updateCheck";
final boolean publish = checkDynChange(prop);
final boolean oldValue = this.updateCheck;
this.updateCheck = updateCheck;
if (publish) {
firePropertyChange(prop, oldValue, updateCheck);
}
}
内容来源于网络,如有侵权,请联系作者删除!