本文整理了Java中net.sf.ehcache.config.Configuration.addTerracottaConfig()
方法的一些代码示例,展示了Configuration.addTerracottaConfig()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.addTerracottaConfig()
方法的具体详情如下:
包路径:net.sf.ehcache.config.Configuration
类名称:Configuration
方法名:addTerracottaConfig
[英]Allows BeanHandler to add a Terracotta configuration to the configuration
[中]允许BeanHandler将Terracotta配置添加到配置中
代码示例来源:origin: jooby-project/jooby
private void terracotaConfig(final Config config) {
TerracottaClientConfiguration terracota = new TerracottaClientConfiguration();
sbool("ehcache.terracottaConfig", config, "rejoin", terracota::setRejoin);
sstr("ehcache.terracottaConfig", config, "url", terracota::setUrl);
sbool("ehcache.terracottaConfig", config, "wanEnabledTSA", terracota::setWanEnabledTSA);
eh.addTerracottaConfig(terracota);
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* Builder method to Terracotta capabilities to the cache manager through a dedicated configuration, this can only be used once.
*
* @return this configuration instance
* @throws ObjectExistsException
* if the Terracotta config has already been configured
*/
public final Configuration terracotta(TerracottaClientConfiguration terracottaConfiguration) throws ObjectExistsException {
addTerracottaConfig(terracottaConfiguration);
return this;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
/**
* Builder method to Terracotta capabilities to the cache manager through a dedicated configuration, this can only be used once.
*
* @return this configuration instance
* @throws ObjectExistsException
* if the Terracotta config has already been configured
*/
public final Configuration terracotta(TerracottaClientConfiguration terracottaConfiguration) throws ObjectExistsException {
addTerracottaConfig(terracottaConfiguration);
return this;
}
代码示例来源:origin: net.sf.ehcache.internal/ehcache-core
/**
* Builder method to Terracotta capabilities to the cache manager through a dedicated configuration, this can only be used once.
*
* @return this configuration instance
* @throws ObjectExistsException
* if the Terracotta config has already been configured
*/
public final Configuration terracotta(TerracottaClientConfiguration terracottaConfiguration) throws ObjectExistsException {
addTerracottaConfig(terracottaConfiguration);
return this;
}
代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache
/**
* Builder method to Terracotta capabilities to the cache manager through a dedicated configuration, this can only be used once.
*
* @return this configuration instance
* @throws ObjectExistsException
* if the Terracotta config has already been configured
*/
public final Configuration terracotta(TerracottaClientConfiguration terracottaConfiguration) throws ObjectExistsException {
addTerracottaConfig(terracottaConfiguration);
return this;
}
代码示例来源:origin: org.onebusaway/onebusaway-container
public void afterPropertiesSet() throws IOException, CacheException {
logger.info("Initializing EHCache CacheManager");
this.configuration = ConfigurationFactory.parseConfiguration(this.configLocation.getInputStream());
if (this.diskStorePath != null) {
logger.info("diskStorePath=" + this.diskStorePath);
DiskStoreConfiguration dsConfig = new DiskStoreConfiguration();
dsConfig.setPath(this.diskStorePath);
logger.info("diskStorePath (translated)=" + dsConfig.getPath());
configuration.addDiskStore(dsConfig);
}
if (this.terracottaUrl != null) {
logger.info("terracottaUrl=" + this.terracottaUrl);
TerracottaConfigConfiguration tcConfig = new TerracottaConfigConfiguration();
tcConfig.setUrl(this.terracottaUrl);
configuration.addTerracottaConfig(tcConfig);
}
}
代码示例来源:origin: OneBusAway/onebusaway-application-modules
public void afterPropertiesSet() throws IOException, CacheException {
logger.info("Initializing EHCache CacheManager");
this.configuration = ConfigurationFactory.parseConfiguration(this.configLocation.getInputStream());
if (this.diskStorePath != null) {
logger.info("diskStorePath=" + this.diskStorePath);
DiskStoreConfiguration dsConfig = new DiskStoreConfiguration();
dsConfig.setPath(this.diskStorePath);
logger.info("diskStorePath (translated)=" + dsConfig.getPath());
configuration.addDiskStore(dsConfig);
}
if (this.terracottaUrl != null) {
logger.info("terracottaUrl=" + this.terracottaUrl);
TerracottaClientConfiguration tcConfig = new TerracottaClientConfiguration();
tcConfig.setUrl(this.terracottaUrl);
configuration.addTerracottaConfig(tcConfig);
}
}
代码示例来源:origin: org.jooby/jooby-ehcache
private void terracotaConfig(final Config config) {
TerracottaClientConfiguration terracota = new TerracottaClientConfiguration();
sbool("ehcache.terracottaConfig", config, "rejoin", terracota::setRejoin);
sstr("ehcache.terracottaConfig", config, "url", terracota::setUrl);
sbool("ehcache.terracottaConfig", config, "wanEnabledTSA", terracota::setWanEnabledTSA);
eh.addTerracottaConfig(terracota);
}
代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl
terracottaConfig.setUrl(serverUrlsString);
terracottaConfig.setRejoin(true);
configuration.addTerracottaConfig(terracottaConfig);
configuration.addTerracottaConfig(terracottaConfig);
if (this.cacheManagerName != null) {
if (this.shared && createWithConfiguration == null) {
内容来源于网络,如有侵权,请联系作者删除!