Class EndpointMetricCacheManager

java.lang.Object
org.easypeelsecurity.springdog.manager.statistics.EndpointMetricCacheManager

public abstract class EndpointMetricCacheManager extends Object
Manages the cache for endpoint metrics.
  • Constructor Details

    • EndpointMetricCacheManager

      public EndpointMetricCacheManager()
  • Method Details

    • addResponseTime

      public static void addResponseTime(String methodSignature, long responseTime)
      Adds a response time for a specific endpoint identified by its path and method.
      Parameters:
      methodSignature - the method signature of the endpoint
      responseTime - the response time to be added
    • incrementFailureCount

      public static void incrementFailureCount(String methodSignature)
      Increments the failure count for a specific endpoint identified by method signature.
      Parameters:
      methodSignature - the fully qualified method name of the endpoint
    • getAllData

      public static List<EndpointMetricCached> getAllData()
      Gets all cache data.
      Returns:
      a list of all cache data
    • invalidateByMethodSignature

      public static void invalidateByMethodSignature(String methodSignature)
      Invalidates the cache for the specified key.
    • clear

      public static void clear()
      Clears the cache.