本文整理了Java中net.sf.ehcache.config.Configuration.getSizeOfPolicyConfiguration()
方法的一些代码示例,展示了Configuration.getSizeOfPolicyConfiguration()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.getSizeOfPolicyConfiguration()
方法的具体详情如下:
包路径:net.sf.ehcache.config.Configuration
类名称:Configuration
方法名:getSizeOfPolicyConfiguration
[英]Gets the SizeOf policy configuration.
[中]获取策略配置的大小。
代码示例来源:origin: net.sf.ehcache/ehcache
private static SizeOfPolicyConfiguration resolvePolicy(Configuration configuration, CacheConfiguration cacheConfiguration) {
SizeOfPolicyConfiguration sizeOfPolicyConfiguration = null;
if (cacheConfiguration != null) {
sizeOfPolicyConfiguration = cacheConfiguration.getSizeOfPolicyConfiguration();
}
if (sizeOfPolicyConfiguration == null) {
if (configuration != null) {
sizeOfPolicyConfiguration = configuration.getSizeOfPolicyConfiguration();
} else {
sizeOfPolicyConfiguration = new SizeOfPolicyConfiguration();
}
}
return sizeOfPolicyConfiguration;
}
代码示例来源:origin: net.sf.ehcache/ehcache
private void testAddSizeOfPolicyElement() {
SizeOfPolicyConfiguration sizeOfPolicyConfiguration = configuration.getSizeOfPolicyConfiguration();
if (sizeOfPolicyConfiguration != null &&
!Configuration.DEFAULT_SIZEOF_POLICY_CONFIGURATION.equals(sizeOfPolicyConfiguration)) {
addChildElement(new SizeOfPolicyConfigurationElement(this, sizeOfPolicyConfiguration));
}
}
代码示例来源:origin: net.sf.ehcache/ehcache
sizeOfPolicyConfiguration = getConfiguration().getSizeOfPolicyConfiguration();
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
private static SizeOfPolicyConfiguration resolvePolicy(Configuration configuration, CacheConfiguration cacheConfiguration) {
SizeOfPolicyConfiguration sizeOfPolicyConfiguration = null;
if (cacheConfiguration != null) {
sizeOfPolicyConfiguration = cacheConfiguration.getSizeOfPolicyConfiguration();
}
if (sizeOfPolicyConfiguration == null) {
if (configuration != null) {
sizeOfPolicyConfiguration = configuration.getSizeOfPolicyConfiguration();
} else {
sizeOfPolicyConfiguration = new SizeOfPolicyConfiguration();
}
}
return sizeOfPolicyConfiguration;
}
代码示例来源:origin: net.sf.ehcache.internal/ehcache-core
private static SizeOfPolicyConfiguration resolvePolicy(Configuration configuration, CacheConfiguration cacheConfiguration) {
SizeOfPolicyConfiguration sizeOfPolicyConfiguration = null;
if (cacheConfiguration != null) {
sizeOfPolicyConfiguration = cacheConfiguration.getSizeOfPolicyConfiguration();
}
if (sizeOfPolicyConfiguration == null) {
if (configuration != null) {
sizeOfPolicyConfiguration = configuration.getSizeOfPolicyConfiguration();
} else {
sizeOfPolicyConfiguration = new SizeOfPolicyConfiguration();
}
}
return sizeOfPolicyConfiguration;
}
代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache
private static SizeOfPolicyConfiguration resolvePolicy(Configuration configuration, CacheConfiguration cacheConfiguration) {
SizeOfPolicyConfiguration sizeOfPolicyConfiguration = null;
if (cacheConfiguration != null) {
sizeOfPolicyConfiguration = cacheConfiguration.getSizeOfPolicyConfiguration();
}
if (sizeOfPolicyConfiguration == null) {
if (configuration != null) {
sizeOfPolicyConfiguration = configuration.getSizeOfPolicyConfiguration();
} else {
sizeOfPolicyConfiguration = new SizeOfPolicyConfiguration();
}
}
return sizeOfPolicyConfiguration;
}
代码示例来源:origin: net.sf.ehcache.internal/ehcache-core
private void testAddSizeOfPolicyElement() {
SizeOfPolicyConfiguration sizeOfPolicyConfiguration = configuration.getSizeOfPolicyConfiguration();
if (sizeOfPolicyConfiguration != null &&
!Configuration.DEFAULT_SIZEOF_POLICY_CONFIGURATION.equals(sizeOfPolicyConfiguration)) {
addChildElement(new SizeOfPolicyConfigurationElement(this, sizeOfPolicyConfiguration));
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
private void testAddSizeOfPolicyElement() {
SizeOfPolicyConfiguration sizeOfPolicyConfiguration = configuration.getSizeOfPolicyConfiguration();
if (sizeOfPolicyConfiguration != null &&
!Configuration.DEFAULT_SIZEOF_POLICY_CONFIGURATION.equals(sizeOfPolicyConfiguration)) {
addChildElement(new SizeOfPolicyConfigurationElement(this, sizeOfPolicyConfiguration));
}
}
代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache
private void testAddSizeOfPolicyElement() {
SizeOfPolicyConfiguration sizeOfPolicyConfiguration = configuration.getSizeOfPolicyConfiguration();
if (sizeOfPolicyConfiguration != null &&
!Configuration.DEFAULT_SIZEOF_POLICY_CONFIGURATION.equals(sizeOfPolicyConfiguration)) {
addChildElement(new SizeOfPolicyConfigurationElement(this, sizeOfPolicyConfiguration));
}
}
代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl
@Override
public Properties getProperties() {
Configuration ec = cacheManager.getConfiguration();
Properties p = new Properties();
p.put("name", ec.getName());
p.put("source", ec.getConfigurationSource().toString());
p.put("timeoutSeconds", ec.getDefaultTransactionTimeoutInSeconds());
p.put("maxBytesDisk", ec.getMaxBytesLocalDisk());
p.put("maxBytesHeap", ec.getMaxBytesLocalHeap());
p.put("maxDepth", ec.getSizeOfPolicyConfiguration().getMaxDepth());
p.put("defaultCacheMaxEntries", ec.getDefaultCacheConfiguration().getMaxEntriesLocalHeap());
p.put("defaultCacheTimeToIdleSecs", ec.getDefaultCacheConfiguration().getTimeToIdleSeconds());
p.put("defaultCacheTimeToLiveSecs", ec.getDefaultCacheConfiguration().getTimeToLiveSeconds());
p.put("defaultCacheEternal", ec.getDefaultCacheConfiguration().isEternal());
return p;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
sizeOfPolicyConfiguration = getConfiguration().getSizeOfPolicyConfiguration();
代码示例来源:origin: net.sf.ehcache.internal/ehcache-core
sizeOfPolicyConfiguration = getConfiguration().getSizeOfPolicyConfiguration();
代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache
sizeOfPolicyConfiguration = getConfiguration().getSizeOfPolicyConfiguration();
代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl
configuration.setName(this.cacheManagerName);
configuration.getSizeOfPolicyConfiguration().maxDepthExceededBehavior(SizeOfPolicyConfiguration.MaxDepthExceededBehavior.ABORT);
configuration.getSizeOfPolicyConfiguration().maxDepth(100);
内容来源于网络,如有侵权,请联系作者删除!