Class CRLCache

  • All Implemented Interfaces:
    ManageableCache

    public class CRLCache
    extends Object
    implements 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 Detail

      • getCache

        public static CRLCache getCache​(int cacheSize,
                                        int cacheDelayMins)
      • 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 cache
        delay - defines how frequently the CacheManager will be started
      • getNextCacheValue

        public ManageableCacheValue 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:
        getNextCacheValue in interface ManageableCache
        Returns:
        next cache value of the cache.
      • getCacheSize

        public int getCacheSize()
        To get the current cache size (size of the hash map).
        Specified by:
        getCacheSize in interface ManageableCache
      • getCacheValue

        public X509CRL getCacheValue​(String crlUrl)
      • setCacheValue

        public void setCacheValue​(String crlUrl,
                                  X509CRL crl)
      • removeCacheValue

        public void removeCacheValue​(String crlUrl)