Class HttpCacheEntry


  • public class HttpCacheEntry
    extends Object
    HttpCacheEntry Each entry holds cached (HTTP) response: a) response bytes b) response headers c) expiryTime d) parameterEncoding used e) entryKey this entry represents, to match the entry within the hash bucket. XXX: should implement methods to enable serialization of cached response?
    • Constructor Detail

      • HttpCacheEntry

        public HttpCacheEntry()
    • Method Detail

      • setExpireTime

        public void setExpireTime​(long expireTime)
        set the real expire time
        Parameters:
        expireTime - in milli seconds
      • computeExpireTime

        public void computeExpireTime​(int timeout)
        compute when this entry to be expired based on timeout relative to current time.
        Parameters:
        timeout - in seconds
      • isValid

        public boolean isValid()
        is this response still valid?
      • clear

        public void clear()
        clear the contents
      • getSize

        public int getSize()
        get the size
        Returns:
        size of this entry in bytes Note: this is only approximate