org.apache.synapse.transport.certificatevalidation.cache

## Class CacheManager

- java.lang.Object
- - org.apache.synapse.transport.certificatevalidation.cache.CacheManager

-     public class CacheManager
      extends Object

  Cache Manager takes care and maintains an LRU cache which implements ManageableCache Interface. CAUTION!! If CacheManager is too much involved with the cache, other threads will be affected.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CacheManager(ManageableCache cache, int cacheMaxSize, int delay)` A new cacheManager will be started on the given ManageableCache object.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `changeDelay(int delay)`
    `int` | `getDelay()`
    `boolean` | `isRunning()`
    `boolean` | `stop()` Gracefully stop cacheManager.
    `boolean` | `wakeUpNow()` To wake cacheManager up at will.

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

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

- - ### Constructor Detail

    - #### CacheManager

          public CacheManager(ManageableCache cache,
                              int cacheMaxSize,
                              int delay)

      A new cacheManager will be started on the given ManageableCache object.
      Parameters:
        `cache` - a Manageable Cache which could be managed by this cache manager.
        `cacheMaxSize` - Maximum size of the cache. If the cache exceeds this size, LRU values will be removed

  - ### Method Detail

    - #### wakeUpNow

          public boolean wakeUpNow()

      To wake cacheManager up at will. If this method is called while its task is running, it will run its task again soon after its done. CacheManagerTask will be rescheduled as before.
      Returns:
        true if successfully waken up. false otherwise.

    - #### changeDelay

          public boolean changeDelay(int delay)
                              throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### getDelay

          public int getDelay()

    - #### stop

          public boolean stop()

      Gracefully stop cacheManager.

    - #### isRunning

          public boolean isRunning()

Copyright © 2005–2023 Apache Software Foundation. All rights reserved.