Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
protected AtomicLong |
failCount
本实例解析失败的任务数据
|
protected AtomicLong |
taskCount
本实例解析成功的任务数据
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
CrawlerProcessor(Crawler crawler,
ThreadPoolExecutor threadPool) |
Modifier and Type | Method and Description |
---|---|
protected int |
getActiveCount()
获取到风铃虫线程池里最大活跃的线程数
|
protected Statu |
getStatu()
获取实例的状态
|
ThreadPoolExecutor |
getThreadPool()
获取线程池
|
protected boolean |
isActive()
判断此处理器是否处于活跃状态
|
void |
run() |
activeCount, 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, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
protected final AtomicLong taskCount
protected final AtomicLong failCount
public CrawlerProcessor(Crawler crawler, ThreadPoolExecutor threadPool)
protected Statu getStatu()
protected int getActiveCount()
protected boolean isActive()
public ThreadPoolExecutor getThreadPool()
Copyright © 2020 Pivotal Software, Inc.. All rights reserved.