net.sf.ehcache.config.Configuration.getSizeOfPolicyConfiguration()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(120)

本文整理了Java中net.sf.ehcache.config.Configuration.getSizeOfPolicyConfiguration()方法的一些代码示例,展示了Configuration.getSizeOfPolicyConfiguration()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.getSizeOfPolicyConfiguration()方法的具体详情如下:
包路径:net.sf.ehcache.config.Configuration
类名称:Configuration
方法名:getSizeOfPolicyConfiguration

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);

相关文章

Configuration类方法