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

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

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

Configuration.getCacheManagerPeerProviderFactoryConfiguration介绍

[英]Gets the CacheManagerPeerProvider factory configuration.
[中]获取CacheManagerPeerProvider工厂配置。

代码示例

代码示例来源:origin: net.sf.ehcache/ehcache

private void testAddCacheManagerPeerProviderFactoryElement() {
  List<FactoryConfiguration> cacheManagerPeerProviderFactoryConfiguration = configuration
      .getCacheManagerPeerProviderFactoryConfiguration();
  if (cacheManagerPeerProviderFactoryConfiguration != null) {
    addAllFactoryConfigsAsChildElements(this, "cacheManagerPeerProviderFactory", cacheManagerPeerProviderFactoryConfiguration);
  }
}

代码示例来源:origin: net.sf.ehcache/ehcache

/**
 * Tries to load the class specified otherwise defaults to null
 *
 * @return a map of CacheManagerPeerProviders
 */
public Map<String, CacheManagerPeerProvider> createCachePeerProviders() {
  String className = null;
  Map<String, CacheManagerPeerProvider> cacheManagerPeerProviders = new HashMap<String, CacheManagerPeerProvider>();
  List<FactoryConfiguration> cachePeerProviderFactoryConfiguration =
      configuration.getCacheManagerPeerProviderFactoryConfiguration();
  for (FactoryConfiguration factoryConfiguration : cachePeerProviderFactoryConfiguration) {
    if (factoryConfiguration != null) {
      className = factoryConfiguration.getFullyQualifiedClassPath();
    }
    if (className == null) {
      LOG.debug("No CachePeerProviderFactoryConfiguration specified. Not configuring a CacheManagerPeerProvider.");
      return null;
    } else {
      CacheManagerPeerProviderFactory cacheManagerPeerProviderFactory =
          (CacheManagerPeerProviderFactory)
              ClassLoaderUtil.createNewInstance(loader, className);
      Properties properties = PropertyUtil.parseProperties(factoryConfiguration.getProperties(),
          factoryConfiguration.getPropertySeparator());
      CacheManagerPeerProvider cacheManagerPeerProvider =
          cacheManagerPeerProviderFactory.createCachePeerProvider(cacheManager, properties);
      cacheManagerPeerProviders.put(cacheManagerPeerProvider.getScheme(), cacheManagerPeerProvider);
    }
  }
  return cacheManagerPeerProviders;
}

代码示例来源:origin: net.sf.ehcache.internal/ehcache-core

private void testAddCacheManagerPeerProviderFactoryElement() {
  List<FactoryConfiguration> cacheManagerPeerProviderFactoryConfiguration = configuration
      .getCacheManagerPeerProviderFactoryConfiguration();
  if (cacheManagerPeerProviderFactoryConfiguration != null) {
    addAllFactoryConfigsAsChildElements(this, "cacheManagerPeerProviderFactory", cacheManagerPeerProviderFactoryConfiguration);
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache

private void testAddCacheManagerPeerProviderFactoryElement() {
  List<FactoryConfiguration> cacheManagerPeerProviderFactoryConfiguration = configuration
      .getCacheManagerPeerProviderFactoryConfiguration();
  if (cacheManagerPeerProviderFactoryConfiguration != null) {
    addAllFactoryConfigsAsChildElements(this, "cacheManagerPeerProviderFactory", cacheManagerPeerProviderFactoryConfiguration);
  }
}

代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache

private void testAddCacheManagerPeerProviderFactoryElement() {
  List<FactoryConfiguration> cacheManagerPeerProviderFactoryConfiguration = configuration
      .getCacheManagerPeerProviderFactoryConfiguration();
  if (cacheManagerPeerProviderFactoryConfiguration != null) {
    addAllFactoryConfigsAsChildElements(this, "cacheManagerPeerProviderFactory", cacheManagerPeerProviderFactoryConfiguration);
  }
}

代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache

/**
 * Tries to load the class specified otherwise defaults to null
 *
 * @return a map of CacheManagerPeerProviders
 */
public Map<String, CacheManagerPeerProvider> createCachePeerProviders() {
  String className = null;
  Map<String, CacheManagerPeerProvider> cacheManagerPeerProviders = new HashMap<String, CacheManagerPeerProvider>();
  List<FactoryConfiguration> cachePeerProviderFactoryConfiguration =
      configuration.getCacheManagerPeerProviderFactoryConfiguration();
  for (FactoryConfiguration factoryConfiguration : cachePeerProviderFactoryConfiguration) {
    if (factoryConfiguration != null) {
      className = factoryConfiguration.getFullyQualifiedClassPath();
    }
    if (className == null) {
      LOG.debug("No CachePeerProviderFactoryConfiguration specified. Not configuring a CacheManagerPeerProvider.");
      return null;
    } else {
      CacheManagerPeerProviderFactory cacheManagerPeerProviderFactory =
          (CacheManagerPeerProviderFactory)
              ClassLoaderUtil.createNewInstance(loader, className);
      Properties properties = PropertyUtil.parseProperties(factoryConfiguration.getProperties(),
          factoryConfiguration.getPropertySeparator());
      CacheManagerPeerProvider cacheManagerPeerProvider =
          cacheManagerPeerProviderFactory.createCachePeerProvider(cacheManager, properties);
      cacheManagerPeerProviders.put(cacheManagerPeerProvider.getScheme(), cacheManagerPeerProvider);
    }
  }
  return cacheManagerPeerProviders;
}

代码示例来源:origin: net.sf.ehcache.internal/ehcache-core

/**
 * Tries to load the class specified otherwise defaults to null
 *
 * @return a map of CacheManagerPeerProviders
 */
public Map<String, CacheManagerPeerProvider> createCachePeerProviders() {
  String className = null;
  Map<String, CacheManagerPeerProvider> cacheManagerPeerProviders = new HashMap<String, CacheManagerPeerProvider>();
  List<FactoryConfiguration> cachePeerProviderFactoryConfiguration =
      configuration.getCacheManagerPeerProviderFactoryConfiguration();
  for (FactoryConfiguration factoryConfiguration : cachePeerProviderFactoryConfiguration) {
    if (factoryConfiguration != null) {
      className = factoryConfiguration.getFullyQualifiedClassPath();
    }
    if (className == null) {
      LOG.debug("No CachePeerProviderFactoryConfiguration specified. Not configuring a CacheManagerPeerProvider.");
      return null;
    } else {
      CacheManagerPeerProviderFactory cacheManagerPeerProviderFactory =
          (CacheManagerPeerProviderFactory)
              ClassLoaderUtil.createNewInstance(loader, className);
      Properties properties = PropertyUtil.parseProperties(factoryConfiguration.getProperties(),
          factoryConfiguration.getPropertySeparator());
      CacheManagerPeerProvider cacheManagerPeerProvider =
          cacheManagerPeerProviderFactory.createCachePeerProvider(cacheManager, properties);
      cacheManagerPeerProviders.put(cacheManagerPeerProvider.getScheme(), cacheManagerPeerProvider);
    }
  }
  return cacheManagerPeerProviders;
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache

/**
 * Tries to load the class specified otherwise defaults to null
 *
 * @return a map of CacheManagerPeerProviders
 */
public Map<String, CacheManagerPeerProvider> createCachePeerProviders() {
  String className = null;
  Map<String, CacheManagerPeerProvider> cacheManagerPeerProviders = new HashMap<String, CacheManagerPeerProvider>();
  List<FactoryConfiguration> cachePeerProviderFactoryConfiguration =
      configuration.getCacheManagerPeerProviderFactoryConfiguration();
  for (FactoryConfiguration factoryConfiguration : cachePeerProviderFactoryConfiguration) {
    if (factoryConfiguration != null) {
      className = factoryConfiguration.getFullyQualifiedClassPath();
    }
    if (className == null) {
      LOG.debug("No CachePeerProviderFactoryConfiguration specified. Not configuring a CacheManagerPeerProvider.");
      return null;
    } else {
      CacheManagerPeerProviderFactory cacheManagerPeerProviderFactory =
          (CacheManagerPeerProviderFactory)
              ClassLoaderUtil.createNewInstance(className);
      Properties properties = PropertyUtil.parseProperties(factoryConfiguration.getProperties(),
          factoryConfiguration.getPropertySeparator());
      CacheManagerPeerProvider cacheManagerPeerProvider =
          cacheManagerPeerProviderFactory.createCachePeerProvider(cacheManager, properties);
      cacheManagerPeerProviders.put(cacheManagerPeerProvider.getScheme(), cacheManagerPeerProvider);
    }
  }
  return cacheManagerPeerProviders;
}

相关文章

Configuration类方法