* Update: Increase eepget timeouts to reduce retries

This commit is contained in:
zzz
2012-06-29 16:25:22 +00:00
parent 4092f61898
commit ab18550711
6 changed files with 24 additions and 6 deletions

View File

@ -458,19 +458,32 @@ public class EepGet {
}
public void stopFetching() { _keepFetching = false; }
/**
* Blocking fetch, returning true if the URL was retrieved, false if all retries failed
* Blocking fetch, returning true if the URL was retrieved, false if all retries failed.
*
* Header timeout default 45 sec, total timeout default none, inactivity timeout default 60 sec.
*/
public boolean fetch() { return fetch(_fetchHeaderTimeout); }
/**
* Blocking fetch, timing out individual attempts if the HTTP response headers
* don't come back in the time given. If the timeout is zero or less, this will
* wait indefinitely.
*
* Total timeout default none, inactivity timeout default 60 sec.
*/
public boolean fetch(long fetchHeaderTimeout) {
return fetch(fetchHeaderTimeout, -1, -1);
}
/**
* Blocking fetch.
*
* @param fetchHeaderTimeout <= 0 for none (proxy will timeout if none, none isn't recommended if no proxy)
* @param totalTimeout <= 0 for default none
* @param inactivityTimeout <= 0 for default 60 sec
*/
public boolean fetch(long fetchHeaderTimeout, long totalTimeout, long inactivityTimeout) {
_fetchHeaderTimeout = fetchHeaderTimeout;
_fetchEndTime = (totalTimeout > 0 ? System.currentTimeMillis() + totalTimeout : -1);