Class CacheManager.HashKey

  • All Implemented Interfaces:
    Cache.Key
    Enclosing class:
    CacheManager

    private static class CacheManager.HashKey
    extends java.lang.Object
    implements Cache.Key
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int hash  
      private java.time.Instant time  
    • Constructor Summary

      Constructors 
      Constructor Description
      HashKey​(int hash, java.time.Instant time)  
      HashKey​(HttpRequest request, java.lang.Boolean isAsync, java.lang.Class<?> responseType)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.time.Instant getTime()
      The time the key was created to be used by purging functions
      int hashCode()
      As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • hash

        private final int hash
      • time

        private final java.time.Instant time
    • Constructor Detail

      • HashKey

        HashKey​(HttpRequest request,
                java.lang.Boolean isAsync,
                java.lang.Class<?> responseType)
      • HashKey

        HashKey​(int hash,
                java.time.Instant time)
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object o)
        Specified by:
        equals in interface Cache.Key
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - the reference object with which to compare.
        Returns:
        true if this object is the same as the obj argument; false otherwise.
        See Also:
        Cache.Key.hashCode(), HashMap
      • hashCode

        public int hashCode()
        Description copied from interface: Cache.Key
        As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (The hashCode may or may not be implemented as some function of an object's memory address at some point in time.)
        Specified by:
        hashCode in interface Cache.Key
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        a hash code value for this object.
        See Also:
        Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object)
      • getTime

        public java.time.Instant getTime()
        Description copied from interface: Cache.Key
        The time the key was created to be used by purging functions
        Specified by:
        getTime in interface Cache.Key
        Returns:
        the time as an instant