Package kong.unirest.core
Interface Cache.Key
- All Known Implementing Classes:
CacheManager.HashKey
- Enclosing interface:
Cache
public static interface Cache.Key
Interface for the cache key which can be implemented by consumers
The key should implement equals and hashCode
It must must return the time the key was created.
-
Method Summary
-
Method Details
-
equals
-
hashCode
int hashCode()As much as is reasonably practical, the hashCode method defined by classObject
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.) -
getTime
Instant getTime()The time the key was created to be used by purging functions- Returns:
- the time as an instant
-