本文整理汇总了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;
}
示例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();
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}