|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mozilla.javascript.commonjs.module.provider.DefaultUrlConnectionExpiryCalculator
public class DefaultUrlConnectionExpiryCalculator
The default heuristic for calculating cache expiry of URL-based resources.
It is simply configured with a default relative expiry, and each invocation
of calculateExpiry(URLConnection)
returns
System.currentTimeMillis()
incremented with the relative expiry.
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultUrlConnectionExpiryCalculator()
public DefaultUrlConnectionExpiryCalculator(long relativeExpiry)
relativeExpiry
- the fixed relative expiry, in milliseconds.Method Detail |
---|
public long calculateExpiry(java.net.URLConnection urlConnection)
UrlConnectionExpiryCalculator
calculateExpiry
in interface UrlConnectionExpiryCalculator
urlConnection
- the URL connection for the resource
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |