java.lang.Runnablepublic final class Distributor
extends java.lang.Thread
Workbench queues with the help of a WorkbenchVirtualizer.
We invite the reader to consult the documentation of WorkbenchVirtualizer first.
The behaviour of this distributor is controlled by two conditions:
Frontier.workbench.size()
is below the current required size (i.e., the front is counted in IP addresses).
Then, this distributor iteratively:
Frontier.refill queue
to see whether there are visit states requiring a refill from the WorkbenchVirtualizer,
in which case it performs a refill.
Frontier.readyURLs and either deleted
(if we already have too many URLs for its scheme+authority),
or enqueued to the workbench (if its visit state has no virtualized URLs and has not reached VisitState.pathQueryLimit()),
or otherwise enqueued to the WorkbenchVirtualizer.
| Modifier and Type | Field | Description |
|---|---|---|
protected long |
lastHighCostStat |
The last time we produced a high-cost statistics.
|
protected long |
lastPurgeCheck |
The last time we checked for visit states to be purged.
|
protected VisitStateSet |
schemeAuthority2VisitState |
An unsynchronized map from scheme+authorities to the corresponding
VisitState. |
protected StatsThread |
statsThread |
The thread printing statistics.
|
| Constructor | Description |
|---|---|
Distributor(Frontier frontier) |
Creates a distributor for the given frontier.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
run() |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitactiveCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldprotected final VisitStateSet schemeAuthority2VisitState
VisitState.protected final StatsThread statsThread
protected volatile long lastHighCostStat
protected volatile long lastPurgeCheck
public Distributor(Frontier frontier)
frontier - the frontier instantiating this distribution.