public class FileCacheQueueScheduler extends DuplicateRemovedScheduler implements MonitorableScheduler, Closeable
logger
Constructor and Description |
---|
FileCacheQueueScheduler(String filePath) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
int |
getLeftRequestsCount(Task task) |
int |
getTotalRequestsCount(Task task) |
Request |
poll(Task task)
get an url to crawl
|
protected void |
pushWhenNoDuplicate(Request request,
Task task) |
getDuplicateRemover, noNeedToRemoveDuplicate, push, setDuplicateRemover, shouldReserved
public FileCacheQueueScheduler(String filePath)
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
protected 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.