Class CacheOnHitEvent<K>

java.lang.Object
io.github.resilience4j.cache.event.CacheOnHitEvent<K>
All Implemented Interfaces:
CacheEvent

public class CacheOnHitEvent<K> extends Object
A CacheEvent which informs about a cache hit.
  • Constructor Details

    • CacheOnHitEvent

      public CacheOnHitEvent(String cacheName, K cacheKey)
  • Method Details

    • getEventType

      public CacheEvent.Type getEventType()
      Description copied from interface: CacheEvent
      Returns the type of the Cache event.
      Returns:
      the type of the Cache event
    • getCacheKey

      public K getCacheKey()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getCacheName

      public String getCacheName()
      Description copied from interface: CacheEvent
      Returns the name of the Cache which has created the event.
      Specified by:
      getCacheName in interface CacheEvent
      Returns:
      the name of the Cache which has created the event
    • getCreationTime

      public ZonedDateTime getCreationTime()
      Description copied from interface: CacheEvent
      Returns the creation time of Cache event.
      Specified by:
      getCreationTime in interface CacheEvent
      Returns:
      the creation time of Cache event