@ThreadSafe public class PriorityScheduler extends DuplicateRemovedScheduler implements MonitorableScheduler
Modifier and Type | Field and Description |
---|---|
static int |
INITIAL_CAPACITY |
logger
Constructor and Description |
---|
PriorityScheduler() |
Modifier and Type | Method and Description |
---|---|
int |
getLeftRequestsCount(Task task) |
int |
getTotalRequestsCount(Task task) |
Request |
poll(Task task)
get an url to crawl
|
void |
pushWhenNoDuplicate(Request request,
Task task) |
getDuplicateRemover, noNeedToRemoveDuplicate, push, setDuplicateRemover, shouldReserved
public static final int INITIAL_CAPACITY
public void pushWhenNoDuplicate(Request request, Task task)
pushWhenNoDuplicate
in class DuplicateRemovedScheduler
public Request poll(Task task)
Scheduler
public int getLeftRequestsCount(Task task)
getLeftRequestsCount
in interface MonitorableScheduler
public int getTotalRequestsCount(Task task)
getTotalRequestsCount
in interface MonitorableScheduler
Copyright © 2017. All rights reserved.