当前位置: 首页>>代码示例>>Java>>正文


Java EhCacheFactoryBean.setCacheManager方法代码示例

本文整理汇总了Java中org.springframework.cache.ehcache.EhCacheFactoryBean.setCacheManager方法的典型用法代码示例。如果您正苦于以下问题:Java EhCacheFactoryBean.setCacheManager方法的具体用法?Java EhCacheFactoryBean.setCacheManager怎么用?Java EhCacheFactoryBean.setCacheManager使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.springframework.cache.ehcache.EhCacheFactoryBean的用法示例。


在下文中一共展示了EhCacheFactoryBean.setCacheManager方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ehcacheTicketsCache

import org.springframework.cache.ehcache.EhCacheFactoryBean; //导入方法依赖的package包/类
@Lazy
@Autowired
@Bean
public EhCacheFactoryBean ehcacheTicketsCache(@Qualifier("cacheManager") final CacheManager manager) {
    final EhcacheProperties ehcacheProperties = casProperties.getTicket().getRegistry().getEhcache();
    final EhCacheFactoryBean bean = new EhCacheFactoryBean();
    bean.setCacheName(ehcacheProperties.getCacheName());
    bean.setCacheEventListeners(Collections.singleton(ticketRMISynchronousCacheReplicator()));
    bean.setTimeToIdle(ehcacheProperties.getCacheTimeToIdle());
    bean.setTimeToLive(ehcacheProperties.getCacheTimeToLive());

    bean.setCacheManager(manager);
    bean.setBootstrapCacheLoader(ticketCacheBootstrapCacheLoader());
    bean.setDiskExpiryThreadIntervalSeconds(ehcacheProperties.getDiskExpiryThreadIntervalSeconds());

    bean.setEternal(ehcacheProperties.isEternal());
    bean.setMaxEntriesLocalHeap(ehcacheProperties.getMaxElementsInMemory());
    bean.setMaxEntriesInCache(ehcacheProperties.getMaxElementsInCache());
    bean.setMaxEntriesLocalDisk(ehcacheProperties.getMaxElementsOnDisk());
    bean.setMemoryStoreEvictionPolicy(ehcacheProperties.getMemoryStoreEvictionPolicy());

    final PersistenceConfiguration c = new PersistenceConfiguration();
    c.strategy(ehcacheProperties.getPersistence());
    c.setSynchronousWrites(ehcacheProperties.isSynchronousWrites());
    bean.persistence(c);

    return bean;
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:29,代码来源:EhcacheTicketRegistryConfiguration.java

示例2: ehcache

import org.springframework.cache.ehcache.EhCacheFactoryBean; //导入方法依赖的package包/类
@Bean
public Ehcache ehcache(){
    EhCacheFactoryBean cacheFactoryBean = new EhCacheFactoryBean();
    cacheFactoryBean.setCacheManager(cacheManager());
    cacheFactoryBean.setCacheName("aclCache");
    cacheFactoryBean.setMaxBytesLocalHeap("1M");
    cacheFactoryBean.setMaxEntriesLocalHeap(0L);
    cacheFactoryBean.afterPropertiesSet();
    return cacheFactoryBean.getObject();
}
 
开发者ID:PacktPublishing,项目名称:Spring-Security-Third-Edition,代码行数:11,代码来源:AclConfig.java

示例3: clusterEhcache

import org.springframework.cache.ehcache.EhCacheFactoryBean; //导入方法依赖的package包/类
@Bean
public EhCacheFactoryBean clusterEhcache() {
  EhCacheFactoryBean factory = new EhCacheFactoryBean();
  factory.setCacheName("clusterCache");
  factory.setCacheManager(cacheManager);
  return factory;
}
 
开发者ID:c2mon,项目名称:c2mon,代码行数:8,代码来源:ClusterCacheConfig.java

示例4: alarmEhcache

import org.springframework.cache.ehcache.EhCacheFactoryBean; //导入方法依赖的package包/类
@Bean
public EhCacheFactoryBean alarmEhcache(CacheManager cacheManager) {
  EhCacheFactoryBean factory = new EhCacheFactoryBean();
  factory.setCacheName("alarmCache");
  factory.setCacheManager(cacheManager);
  return factory;
}
 
开发者ID:c2mon,项目名称:c2mon,代码行数:8,代码来源:AlarmCacheConfig.java

示例5: commandTagEhcache

import org.springframework.cache.ehcache.EhCacheFactoryBean; //导入方法依赖的package包/类
@Bean
public EhCacheFactoryBean commandTagEhcache(CacheManager cacheManager) {
  EhCacheFactoryBean factory = new EhCacheFactoryBean();
  factory.setCacheName("commandCache");
  factory.setCacheManager(cacheManager);
  return factory;
}
 
开发者ID:c2mon,项目名称:c2mon,代码行数:8,代码来源:CommandTagCacheConfig.java

示例6: deviceEhcache

import org.springframework.cache.ehcache.EhCacheFactoryBean; //导入方法依赖的package包/类
@Bean
public EhCacheFactoryBean deviceEhcache(CacheManager cacheManager) {
  EhCacheFactoryBean factory = new EhCacheFactoryBean();
  factory.setCacheName("deviceCache");
  factory.setCacheManager(cacheManager);
  return factory;
}
 
开发者ID:c2mon,项目名称:c2mon,代码行数:8,代码来源:DeviceCacheConfig.java

示例7: processEhcache

import org.springframework.cache.ehcache.EhCacheFactoryBean; //导入方法依赖的package包/类
@Bean
public EhCacheFactoryBean processEhcache(CacheManager cacheManager) {
  EhCacheFactoryBean factory = new EhCacheFactoryBean();
  factory.setCacheName("processCache");
  factory.setCacheManager(cacheManager);
  return factory;
}
 
开发者ID:c2mon,项目名称:c2mon,代码行数:8,代码来源:ProcessCacheConfig.java

示例8: deviceClassEhcache

import org.springframework.cache.ehcache.EhCacheFactoryBean; //导入方法依赖的package包/类
@Bean
public EhCacheFactoryBean deviceClassEhcache(CacheManager cacheManager) {
  EhCacheFactoryBean factory = new EhCacheFactoryBean();
  factory.setCacheName("deviceClassCache");
  factory.setCacheManager(cacheManager);
  return factory;
}
 
开发者ID:c2mon,项目名称:c2mon,代码行数:8,代码来源:DeviceClassCacheConfig.java

示例9: dataTagEhcache

import org.springframework.cache.ehcache.EhCacheFactoryBean; //导入方法依赖的package包/类
@Bean
public EhCacheFactoryBean dataTagEhcache(CacheManager cacheManager) {
  EhCacheFactoryBean factory = new EhCacheFactoryBean();
  factory.setCacheName("tagCache");
  factory.setCacheManager(cacheManager);
  return factory;
}
 
开发者ID:c2mon,项目名称:c2mon,代码行数:8,代码来源:DataTagCacheConfig.java

示例10: ruleTagEhcache

import org.springframework.cache.ehcache.EhCacheFactoryBean; //导入方法依赖的package包/类
@Bean
public EhCacheFactoryBean ruleTagEhcache(CacheManager cacheManager) {
  EhCacheFactoryBean factory = new EhCacheFactoryBean();
  factory.setCacheName("ruleCache");
  factory.setCacheManager(cacheManager);
  return factory;
}
 
开发者ID:c2mon,项目名称:c2mon,代码行数:8,代码来源:RuleTagCacheConfig.java

示例11: controlTagEhcache

import org.springframework.cache.ehcache.EhCacheFactoryBean; //导入方法依赖的package包/类
@Bean
public EhCacheFactoryBean controlTagEhcache(CacheManager cacheManager) {
  EhCacheFactoryBean factory = new EhCacheFactoryBean();
  factory.setCacheName("controlCache");
  factory.setCacheManager(cacheManager);
  return factory;
}
 
开发者ID:c2mon,项目名称:c2mon,代码行数:8,代码来源:ControlTagCacheConfig.java

示例12: equipmentEhcache

import org.springframework.cache.ehcache.EhCacheFactoryBean; //导入方法依赖的package包/类
@Bean
public EhCacheFactoryBean equipmentEhcache(CacheManager cacheManager) {
  EhCacheFactoryBean factory = new EhCacheFactoryBean();
  factory.setCacheName("equipmentCache");
  factory.setCacheManager(cacheManager);
  return factory;
}
 
开发者ID:c2mon,项目名称:c2mon,代码行数:8,代码来源:EquipmentCacheConfig.java

示例13: subEquipmentEhcache

import org.springframework.cache.ehcache.EhCacheFactoryBean; //导入方法依赖的package包/类
@Bean
public EhCacheFactoryBean subEquipmentEhcache(CacheManager cacheManager) {
  EhCacheFactoryBean factory = new EhCacheFactoryBean();
  factory.setCacheName("subEquipmentCache");
  factory.setCacheManager(cacheManager);
  return factory;
}
 
开发者ID:c2mon,项目名称:c2mon,代码行数:8,代码来源:SubEquipmentCacheConfig.java

示例14: commFaultTagEhcache

import org.springframework.cache.ehcache.EhCacheFactoryBean; //导入方法依赖的package包/类
@Bean
public EhCacheFactoryBean commFaultTagEhcache(CacheManager cacheManager) {
  EhCacheFactoryBean factory = new EhCacheFactoryBean();
  factory.setCacheName("commFaultTagCache");
  factory.setCacheManager(cacheManager);
  return factory;
}
 
开发者ID:c2mon,项目名称:c2mon,代码行数:8,代码来源:CommFaultTagCacheConfig.java

示例15: aliveTimerEhcache

import org.springframework.cache.ehcache.EhCacheFactoryBean; //导入方法依赖的package包/类
@Bean
public EhCacheFactoryBean aliveTimerEhcache(CacheManager cacheManager) {
  EhCacheFactoryBean factory = new EhCacheFactoryBean();
  factory.setCacheName("aliveTimerCache");
  factory.setCacheManager(cacheManager);
  return factory;
}
 
开发者ID:c2mon,项目名称:c2mon,代码行数:8,代码来源:AliveTimerCacheConfig.java


注:本文中的org.springframework.cache.ehcache.EhCacheFactoryBean.setCacheManager方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。