Java Code Examples for javax.cache.Caching#getCacheManager()

The following examples show how to use javax.cache.Caching#getCacheManager() . 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: JCache.java    From dubbox with Apache License 2.0 4 votes vote down vote up
public JCache(URL url) {
    String type = url.getParameter("jcache");
    CacheManager cacheManager = type == null || type.length() == 0 ? Caching.getCacheManager() : Caching.getCacheManager(type);
    CacheBuilder<Object, Object> cacheBuilder = cacheManager.createCacheBuilder(url.getServiceKey());
    this.store = cacheBuilder.build();
}
 
Example 2
Source File: JCache.java    From dubbox-hystrix with Apache License 2.0 4 votes vote down vote up
public JCache(URL url) {
    String type = url.getParameter("jcache");
    CacheManager cacheManager = type == null || type.length() == 0 ? Caching.getCacheManager() : Caching.getCacheManager(type);
    CacheBuilder<Object, Object> cacheBuilder = cacheManager.createCacheBuilder(url.getServiceKey());
    this.store = cacheBuilder.build();
}
 
Example 3
Source File: JCache.java    From dubbox with Apache License 2.0 4 votes vote down vote up
public JCache(URL url) {
    String type = url.getParameter("jcache");
    CacheManager cacheManager = type == null || type.length() == 0 ? Caching.getCacheManager() : Caching.getCacheManager(type);
    CacheBuilder<Object, Object> cacheBuilder = cacheManager.createCacheBuilder(url.getServiceKey());
    this.store = cacheBuilder.build();
}
 
Example 4
Source File: JCache.java    From dubbox with Apache License 2.0 4 votes vote down vote up
public JCache(URL url) {
    String type = url.getParameter("jcache");
    CacheManager cacheManager = type == null || type.length() == 0 ? Caching.getCacheManager() : Caching.getCacheManager(type);
    CacheBuilder<Object, Object> cacheBuilder = cacheManager.createCacheBuilder(url.getServiceKey());
    this.store = cacheBuilder.build();
}
 
Example 5
Source File: CacheInvalidationServiceImpl.java    From carbon-apimgt with Apache License 2.0 2 votes vote down vote up
protected CacheManager getCacheManager() {

        return Caching.getCacheManager(APIConstants.API_MANAGER_CACHE_MANAGER);
    }
 
Example 6
Source File: AbstractScopesIssuer.java    From carbon-apimgt with Apache License 2.0 2 votes vote down vote up
/**
 * Get CacheManager instance
 *
 * @param name The name of the Cache
 * @return CacheManager
 */
protected CacheManager getCacheManager(String name) {
    return Caching.getCacheManager(name);
}