Package com.axway.apim.lib
Class APIMCLICacheManager
- java.lang.Object
-
- com.axway.apim.lib.APIMCLICacheManager
-
- All Implemented Interfaces:
Closeable,AutoCloseable,org.ehcache.CacheManager
public class APIMCLICacheManager extends Object implements org.ehcache.CacheManager
-
-
Constructor Summary
Constructors Constructor Description APIMCLICacheManager(org.ehcache.CacheManager cacheManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()<K,V>
org.ehcache.Cache<K,V>createCache(String arg0, org.ehcache.config.Builder<? extends org.ehcache.config.CacheConfiguration<K,V>> arg1)<K,V>
org.ehcache.Cache<K,V>createCache(String arg0, org.ehcache.config.CacheConfiguration<K,V> arg1)voidflipApiId(String oldApiId, String newApiId)There are a number of entities which have references to an API (e.g.<K,V>
org.ehcache.Cache<K,V>getCache(String alias, Class<K> keyType, Class<V> valueType)org.ehcache.config.ConfigurationgetRuntimeConfiguration()org.ehcache.StatusgetStatus()voidinit()voidremoveCache(String arg0)voidsetEnabledCaches(List<CacheType> enabledCaches)
-
-
-
Method Detail
-
close
public void close() throws org.ehcache.StateTransitionException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceorg.ehcache.CacheManager- Specified by:
closein interfaceCloseable- Throws:
org.ehcache.StateTransitionException
-
createCache
public <K,V> org.ehcache.Cache<K,V> createCache(String arg0, org.ehcache.config.CacheConfiguration<K,V> arg1)
- Specified by:
createCachein interfaceorg.ehcache.CacheManager
-
createCache
public <K,V> org.ehcache.Cache<K,V> createCache(String arg0, org.ehcache.config.Builder<? extends org.ehcache.config.CacheConfiguration<K,V>> arg1)
- Specified by:
createCachein interfaceorg.ehcache.CacheManager
-
getCache
public <K,V> org.ehcache.Cache<K,V> getCache(String alias, Class<K> keyType, Class<V> valueType)
- Specified by:
getCachein interfaceorg.ehcache.CacheManager
-
getRuntimeConfiguration
public org.ehcache.config.Configuration getRuntimeConfiguration()
- Specified by:
getRuntimeConfigurationin interfaceorg.ehcache.CacheManager
-
getStatus
public org.ehcache.Status getStatus()
- Specified by:
getStatusin interfaceorg.ehcache.CacheManager
-
init
public void init() throws org.ehcache.StateTransitionException- Specified by:
initin interfaceorg.ehcache.CacheManager- Throws:
org.ehcache.StateTransitionException
-
removeCache
public void removeCache(String arg0)
- Specified by:
removeCachein interfaceorg.ehcache.CacheManager
-
flipApiId
public void flipApiId(String oldApiId, String newApiId) throws AppException
There are a number of entities which have references to an API (e.g. QuotaRestrictions). These are stored/maintained with their own ID (quotaId) and cached in Ehcache. But, if the API-ID changes, the cached reference points to an API that no longer exists. This method is used to update all entities in the cache when the API ID of an API changes (e.g. with a Replace Action).- Parameters:
oldApiId- the ID currently used by the cached entitiesnewApiId- the new ID that must be replaced- Throws:
AppException- when the cache cannot be updated.
-
-