Class DefaultUrlConnectionExpiryCalculator

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long calculateExpiry​(java.net.URLConnection urlConnection)
      Given a URL connection, returns a calculated heuristic expiry time (in terms of milliseconds since epoch) for the resource.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultUrlConnectionExpiryCalculator

        public DefaultUrlConnectionExpiryCalculator()
        Creates a new default expiry calculator with one minute relative expiry.
      • DefaultUrlConnectionExpiryCalculator

        public DefaultUrlConnectionExpiryCalculator​(long relativeExpiry)
        Creates a new default expiry calculator with the specified relative expiry.
        Parameters:
        relativeExpiry - the fixed relative expiry, in milliseconds.
    • Method Detail

      • calculateExpiry

        public long calculateExpiry​(java.net.URLConnection urlConnection)
        Description copied from interface: UrlConnectionExpiryCalculator
        Given a URL connection, returns a calculated heuristic expiry time (in terms of milliseconds since epoch) for the resource.
        Specified by:
        calculateExpiry in interface UrlConnectionExpiryCalculator
        Parameters:
        urlConnection - the URL connection for the resource
        Returns:
        the expiry for the resource