Class EndpointMetricCacheManager
java.lang.Object
org.easypeelsecurity.springdog.manager.statistics.EndpointMetricCacheManager
Manages the cache for endpoint metrics.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddResponseTime(String methodSignature, long responseTime) Adds a response time for a specific endpoint identified by its path and method.static voidclear()Clears the cache.static List<EndpointMetricCached> Gets all cache data.static voidincrementFailureCount(String methodSignature) Increments the failure count for a specific endpoint identified by method signature.static voidinvalidateByMethodSignature(String methodSignature) Invalidates the cache for the specified key.
-
Constructor Details
-
EndpointMetricCacheManager
public EndpointMetricCacheManager()
-
-
Method Details
-
addResponseTime
Adds a response time for a specific endpoint identified by its path and method.- Parameters:
methodSignature- the method signature of the endpointresponseTime- the response time to be added
-
incrementFailureCount
Increments the failure count for a specific endpoint identified by method signature.- Parameters:
methodSignature- the fully qualified method name of the endpoint
-
getAllData
Gets all cache data.- Returns:
- a list of all cache data
-
invalidateByMethodSignature
Invalidates the cache for the specified key. -
clear
public static void clear()Clears the cache.
-