@SuppressWarnings("WeakerAccess") protected Cache<Object, Object> createCache(String regionName) { switch ( missingCacheStrategy ) { case CREATE_WARN: SecondLevelCacheLogger.INSTANCE.missingCacheCreated( regionName, ConfigSettings.MISSING_CACHE_STRATEGY, MissingCacheStrategy.CREATE.getExternalRepresentation() ); return cacheManager.createCache( regionName, new MutableConfiguration<>() ); case CREATE: return cacheManager.createCache( regionName, new MutableConfiguration<>() ); case FAIL: throw new CacheException( "On-the-fly creation of JCache Cache objects is not supported [" + regionName + "]" ); default: throw new IllegalStateException( "Unsupported missing cache strategy: " + missingCacheStrategy ); } }
protected Ehcache createCache(String regionName) { switch ( missingCacheStrategy ) { case CREATE_WARN: SecondLevelCacheLogger.INSTANCE.missingCacheCreated( regionName, ConfigSettings.MISSING_CACHE_STRATEGY, MissingCacheStrategy.CREATE.getExternalRepresentation() ); cacheManager.addCache( regionName ); return cacheManager.getEhcache( regionName ); case CREATE: cacheManager.addCache( regionName ); return cacheManager.getEhcache( regionName ); case FAIL: throw new CacheException( "On-the-fly creation of Ehcache Cache objects is not supported [" + regionName + "]" ); default: throw new IllegalStateException( "Unsupported missing cache strategy: " + missingCacheStrategy ); } }
@SuppressWarnings("WeakerAccess") protected Cache<Object, Object> createCache(String regionName) { switch ( missingCacheStrategy ) { case CREATE_WARN: SecondLevelCacheLogger.INSTANCE.missingCacheCreated( regionName, ConfigSettings.MISSING_CACHE_STRATEGY, MissingCacheStrategy.CREATE.getExternalRepresentation() ); return cacheManager.createCache( regionName, new MutableConfiguration<>() ); case CREATE: return cacheManager.createCache( regionName, new MutableConfiguration<>() ); case FAIL: throw new CacheException( "On-the-fly creation of JCache Cache objects is not supported [" + regionName + "]" ); default: throw new IllegalStateException( "Unsupported missing cache strategy: " + missingCacheStrategy ); } }
protected Ehcache createCache(String regionName) { switch ( missingCacheStrategy ) { case CREATE_WARN: SecondLevelCacheLogger.INSTANCE.missingCacheCreated( regionName, ConfigSettings.MISSING_CACHE_STRATEGY, MissingCacheStrategy.CREATE.getExternalRepresentation() ); cacheManager.addCache( regionName ); return cacheManager.getEhcache( regionName ); case CREATE: cacheManager.addCache( regionName ); return cacheManager.getEhcache( regionName ); case FAIL: throw new CacheException( "On-the-fly creation of Ehcache Cache objects is not supported [" + regionName + "]" ); default: throw new IllegalStateException( "Unsupported missing cache strategy: " + missingCacheStrategy ); } }