|
|
|
@ -39,6 +39,8 @@ public class Site {
|
|
|
|
|
|
|
|
|
|
private int cycleRetryTimes = 0;
|
|
|
|
|
|
|
|
|
|
private int retrySleepTime = 1000;
|
|
|
|
|
|
|
|
|
|
private int timeOut = 5000;
|
|
|
|
|
|
|
|
|
|
private static final Set<Integer> DEFAULT_STATUS_CODE_SET = new HashSet<Integer>();
|
|
|
|
@ -359,6 +361,20 @@ public class Site {
|
|
|
|
|
return useGzip;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getRetrySleepTime() {
|
|
|
|
|
return retrySleepTime;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set retry sleep times when download fail, 1000 by default. <br>
|
|
|
|
|
*
|
|
|
|
|
* @param retrySleepTime
|
|
|
|
|
*/
|
|
|
|
|
public Site setRetrySleepTime(int retrySleepTime) {
|
|
|
|
|
this.retrySleepTime = retrySleepTime;
|
|
|
|
|
return this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Whether use gzip. <br>
|
|
|
|
|
* Default is true, you can set it to false to disable gzip.
|
|
|
|
|