public class ToePool extends ThreadGroup implements org.archive.util.Reporter
ToeThread
Modifier and Type | Field and Description |
---|---|
protected CrawlController |
controller |
static int |
DEFAULT_TOE_PRIORITY
run worker thread slightly lower than usual
|
protected int |
nextSerialNumber |
protected int |
targetSize |
Constructor and Description |
---|
ToePool(AlertThreadGroup atg,
CrawlController c)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
cleanup() |
void |
compactReportTo(PrintWriter writer) |
int |
getActiveToeCount() |
CrawlController |
getController() |
int |
getToeCount() |
void |
killThread(int threadNumber,
boolean replace)
Kills specified thread.
|
void |
reportTo(PrintWriter writer) |
void |
setSize(int newsize)
Change the number of ToeThreads.
|
String |
shortReportLegend() |
void |
shortReportLineTo(PrintWriter w) |
Map<String,Object> |
shortReportMap() |
void |
waitForAll() |
activeCount, activeGroupCount, allowThreadSuspension, checkAccess, destroy, enumerate, enumerate, enumerate, enumerate, getMaxPriority, getName, getParent, interrupt, isDaemon, isDestroyed, list, parentOf, resume, setDaemon, setMaxPriority, stop, suspend, toString, uncaughtException
public static int DEFAULT_TOE_PRIORITY
protected CrawlController controller
protected int nextSerialNumber
protected int targetSize
public ToePool(AlertThreadGroup atg, CrawlController c)
c
- A reference to the CrawlController for the current crawl.public void cleanup()
public int getActiveToeCount()
public int getToeCount()
public void setSize(int newsize)
newsize
- The new number of ToeThreads.public void killThread(int threadNumber, boolean replace)
WARNING: This operation should be used with great care. It may destabilize the crawler.
threadNumber
- Thread to killreplace
- If true then a new thread will be created to take the
killed threads place. Otherwise the total number of threads
will decrease by one.public CrawlController getController()
public void reportTo(PrintWriter writer)
reportTo
in interface org.archive.util.Reporter
public void compactReportTo(PrintWriter writer)
public Map<String,Object> shortReportMap()
shortReportMap
in interface org.archive.util.Reporter
public void shortReportLineTo(PrintWriter w)
shortReportLineTo
in interface org.archive.util.Reporter
public String shortReportLegend()
shortReportLegend
in interface org.archive.util.Reporter
public void waitForAll()
Copyright © 2003-2014 Internet Archive. All Rights Reserved.