Methods Summary |
---|
public static int | calcScrapeIntervalSecs(int iRecIntervalSecs, int iNumSeeds)Calculate Scrape interval, applying internal min/max limits and default
calculations.
final int MIN = 15 * 60;
final int MAX = 3 * 60 * 60;
// Min 15 min, plus 10 seconds for every seed
// ex. 10 Seeds = 15m + 100s = ~16.66m
// 60 seeds = 15m + 600s = ~25m
// 1000 seeds = 15m + 10000s = ~2h 52m
int scrapeInterval = MIN + (iNumSeeds * 10);
if (iRecIntervalSecs > scrapeInterval)
scrapeInterval = iRecIntervalSecs;
if (scrapeInterval > MAX)
scrapeInterval = MAX;
return scrapeInterval;
|
public org.gudy.azureus2.core3.util.HashWrapper | getHash()
return hash;
|
public long | getNextScrapeStartTime()
return nextScrapeStartTime;
|
public int | getPeers()
return peers;
|
public long | getScrapeStartTime()
return scrapeStartTime;
|
public int | getSeeds()
return seeds ;
|
public int | getStatus()
return status;
|
public java.lang.String | getStatusString()
return sStatus;
|
public java.lang.String | getString()
return( getURL() + ": " + ByteFormatter.encodeString(hash.getBytes()) +",seeds=" + seeds + ",peers=" + peers +",state="+status+
"/"+sStatus+",last="+last_status+"/"+sLastStatus+",start="+scrapeStartTime+",next="+nextScrapeStartTime);
|
public boolean | isValid()
return !(seeds == -1 && peers == -1);
|
public void | revertStatus()
status = last_status;
sStatus = sLastStatus;
|
public void | setNextScrapeStartTime(long _nextScrapeStartTime)
nextScrapeStartTime = _nextScrapeStartTime;
|
public void | setPeers(int p)
peers = p;
|
public void | setScrapeStartTime(long time)
scrapeStartTime = time;
|
public void | setSeeds(int s)
seeds = s;
|
protected void | setStatus(java.lang.String str)
sStatus = str;
|
public void | setStatus(int iNewStatus, java.lang.String sNewStatus)
if (last_status != status && iNewStatus != status)
last_status = status;
if (iNewStatus == TRTrackerScraperResponse.ST_ONLINE) {
status = (!isValid()) ? TRTrackerScraperResponse.ST_INITIALIZING : TRTrackerScraperResponse.ST_ONLINE;
} else {
status = iNewStatus;
}
if (sNewStatus == null)
return;
if (!sLastStatus.equals(sStatus)) {
sLastStatus = sStatus;
}
sStatus = sNewStatus;
|
public void | setStatus(int s)
status = s;
|