Java Code Examples for org.springframework.cache.support.SimpleCacheManager#afterPropertiesSet()
The following examples show how to use
org.springframework.cache.support.SimpleCacheManager#afterPropertiesSet() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CacheTestUtils.java From spring-analysis-note with MIT License | 5 votes |
/** * Create a {@link SimpleCacheManager} with the specified cache(s). * @param cacheNames the names of the caches to create */ public static CacheManager createSimpleCacheManager(String... cacheNames) { SimpleCacheManager result = new SimpleCacheManager(); List<Cache> caches = new ArrayList<>(); for (String cacheName : cacheNames) { caches.add(new ConcurrentMapCache(cacheName)); } result.setCaches(caches); result.afterPropertiesSet(); return result; }
Example 2
Source File: AbstractJCacheTests.java From spring-analysis-note with MIT License | 5 votes |
protected static CacheManager createSimpleCacheManager(String... cacheNames) { SimpleCacheManager result = new SimpleCacheManager(); List<Cache> caches = new ArrayList<>(); for (String cacheName : cacheNames) { caches.add(new ConcurrentMapCache(cacheName)); } result.setCaches(caches); result.afterPropertiesSet(); return result; }
Example 3
Source File: CacheTestUtils.java From java-technology-stack with MIT License | 5 votes |
/** * Create a {@link SimpleCacheManager} with the specified cache(s). * @param cacheNames the names of the caches to create */ public static CacheManager createSimpleCacheManager(String... cacheNames) { SimpleCacheManager result = new SimpleCacheManager(); List<Cache> caches = new ArrayList<>(); for (String cacheName : cacheNames) { caches.add(new ConcurrentMapCache(cacheName)); } result.setCaches(caches); result.afterPropertiesSet(); return result; }
Example 4
Source File: AbstractJCacheTests.java From java-technology-stack with MIT License | 5 votes |
protected static CacheManager createSimpleCacheManager(String... cacheNames) { SimpleCacheManager result = new SimpleCacheManager(); List<Cache> caches = new ArrayList<>(); for (String cacheName : cacheNames) { caches.add(new ConcurrentMapCache(cacheName)); } result.setCaches(caches); result.afterPropertiesSet(); return result; }
Example 5
Source File: CacheTestUtils.java From spring4-understanding with Apache License 2.0 | 5 votes |
/** * Create a {@link SimpleCacheManager} with the specified cache(s). * @param cacheNames the names of the caches to create */ public static CacheManager createSimpleCacheManager(String... cacheNames) { SimpleCacheManager result = new SimpleCacheManager(); List<Cache> caches = new ArrayList<Cache>(); for (String cacheName : cacheNames) { caches.add(new ConcurrentMapCache(cacheName)); } result.setCaches(caches); result.afterPropertiesSet(); return result; }
Example 6
Source File: AbstractJCacheTests.java From spring4-understanding with Apache License 2.0 | 5 votes |
protected static CacheManager createSimpleCacheManager(String... cacheNames) { SimpleCacheManager result = new SimpleCacheManager(); List<Cache> caches = new ArrayList<Cache>(); for (String cacheName : cacheNames) { caches.add(new ConcurrentMapCache(cacheName)); } result.setCaches(caches); result.afterPropertiesSet(); return result; }
Example 7
Source File: ElastiCacheCacheConfigurer.java From spring-cloud-aws with Apache License 2.0 | 5 votes |
@Override public CacheManager cacheManager() { List<Cache> caches = new ArrayList<>(this.cacheNames.size()); for (String cacheName : this.cacheNames) { caches.add(clusterCache(cacheName)); } SimpleCacheManager simpleCacheManager = new SimpleCacheManager(); simpleCacheManager.setCaches(caches); simpleCacheManager.afterPropertiesSet(); return simpleCacheManager; }