Package org.apache.synapse.transport.certificatevalidation.cache

# Class CertCache

java.lang.Object
org.apache.synapse.transport.certificatevalidation.cache.CertCache

All Implemented Interfaces:
  `ManageableCache`

public class CertCache extends Object implements ManageableCache
This is a cache to store a certificate against a unique string (can be a serial number). This is a singleton since more than one cache of this kind should not be allowed. This cache can be used by any place where certificate caching is needed.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static CertCache`
  `getCache()`
  `int`
  `getCacheSize()`
  `X509Certificate`
  `getCacheValue(String serialNumber)`
  `ManageableCacheValue`
  `getNextCacheValue()`
  `void`
  `removeCacheValue(String serialNumber)`
  `static void`
  `resetCache()`
  `void`
  `resetIterator()`
  `void`
  `setCacheValue(String serialNumber, X509Certificate cert)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### getCache

    public static CertCache getCache()

  - ### getCacheValue

    public X509Certificate getCacheValue(String serialNumber)

  - ### getNextCacheValue

    public ManageableCacheValue getNextCacheValue()
    Specified by:
      `getNextCacheValue` in interface `ManageableCache`

  - ### getCacheSize

    public int getCacheSize()
    Specified by:
      `getCacheSize` in interface `ManageableCache`

  - ### resetIterator

    public void resetIterator()
    Specified by:
      `resetIterator` in interface `ManageableCache`

  - ### resetCache

    public static void resetCache()

  - ### setCacheValue

    public void setCacheValue(String serialNumber, X509Certificate cert)

  - ### removeCacheValue

    public void removeCacheValue(String serialNumber)