public class DefaultUrlConnectionExpiryCalculator extends java.lang.Object implements UrlConnectionExpiryCalculator, java.io.Serializable
calculateExpiry(URLConnection)
returns
System.currentTimeMillis()
incremented with the relative expiry.Constructor and Description |
---|
DefaultUrlConnectionExpiryCalculator()
Creates a new default expiry calculator with one minute relative expiry.
|
DefaultUrlConnectionExpiryCalculator(long relativeExpiry)
Creates a new default expiry calculator with the specified relative
expiry.
|
Modifier and Type | Method and 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.
|
public DefaultUrlConnectionExpiryCalculator()
public DefaultUrlConnectionExpiryCalculator(long relativeExpiry)
relativeExpiry
- the fixed relative expiry, in milliseconds.public long calculateExpiry(java.net.URLConnection urlConnection)
UrlConnectionExpiryCalculator
calculateExpiry
in interface UrlConnectionExpiryCalculator
urlConnection
- the URL connection for the resourceCopyright © 2010 - 2020 Adobe. All Rights Reserved