Class CRLCache
java.lang.Object
org.apache.synapse.transport.certificatevalidation.crl.CRLCache
- All Implemented Interfaces:
ManageableCache
Since a CRL maps to a CRL URL, the CRLCache should have x509CRL entries against CRL URLs.
This cache is a Singleton since it is shared by any transport which needs SSL certificate validation
and more than one CRLCache should not be allowed per system.
-
Method Summary
Modifier and TypeMethodDescriptionstatic CRLCachegetCache(int cacheSize, int cacheDelayMins) intTo get the current cache size (size of the hash map).getCacheValue(String crlUrl) This method is needed by the cache Manager to go through the cache entries to remove invalid values or to remove LRU cache values if the cache has reached its max size.voidinit(int size, int delay) This initialize the Cache with a CacheManager.voidremoveCacheValue(String crlUrl) voidvoidsetCacheValue(String crlUrl, X509CRL crl)
-
Method Details
-
getCache
-
init
public void init(int size, int delay) This initialize the Cache with a CacheManager. If this method is called, a cache manager will not be used.- Parameters:
size- max size of the cachedelay- defines how frequently the CacheManager will be started
-
getNextCacheValue
This method is needed by the cache Manager to go through the cache entries to remove invalid values or to remove LRU cache values if the cache has reached its max size. Todo: Can move to an abstract class.- Specified by:
getNextCacheValuein interfaceManageableCache- Returns:
- next cache value of the cache.
-
getCacheSize
public int getCacheSize()To get the current cache size (size of the hash map).- Specified by:
getCacheSizein interfaceManageableCache
-
resetIterator
public void resetIterator()- Specified by:
resetIteratorin interfaceManageableCache
-
getCacheValue
-
setCacheValue
-
removeCacheValue
-