Class DebugCacheStatistics.CacheEntry

java.lang.Object
com.foreach.across.modules.debugweb.events.DebugCacheStatistics.CacheEntry
Enclosing class:
DebugCacheStatistics<T extends org.springframework.cache.Cache>

public static class DebugCacheStatistics.CacheEntry extends Object
Represents a single entry in the cache.
  • Constructor Details

    • CacheEntry

      public CacheEntry(Object key, Optional<Object> value, Duration age, Duration lastAccessed, Long hits)
      Creates a new CacheEntry instance.
      Parameters:
      key - Key of the cache entry.
      value - Value of the cache entry. A null value means the value cannot be resolved, whereas an Optional.empty() value means the stored value is null.
      age - How long this item has been in the cache.
      lastAccessed - How long ago this item was last accessed.
      hits - Successful cache requests for this item.
  • Method Details

    • builder

    • getKey

      public Object getKey()
      Key of the cache entry.
    • getValue

      public Optional<Object> getValue()
      Value of the cache entry. A null value means the value cannot be resolved, whereas an Optional.empty() value means the stored value is null.
    • getAge

      public Duration getAge()
      How long this item has been in the cache.
    • getLastAccessed

      public Duration getLastAccessed()
      How long ago this item was last accessed.
    • getHits

      public Long getHits()
      Successful cache requests for this item.