package us.codecraft.webmagic.scheduler;

import us.codecraft.webmagic.Request;
import us.codecraft.webmagic.Task;

/**
 * Scheduler is the part of url management.<br>
 * You can implement interface Scheduler to do:
 * manage urls to fetch
 * remove duplicate urls
 *
 * @author code4crafter@gmail.com <br>
 * @since 0.1.0
 */
public interface Scheduler {

    /**
     * add a url to fetch
     *
     * @param request
     * @param task
     */
    public void push(Request request, Task task);

    /**
     * 返回下一个要抓取的链接
     *
     * @param task 定义的任务，以满足单Scheduler多Task的情况
     * @return 下一个要抓取的链接
     */
    public Request poll(Task task);

}

@@ -510,19 +510,27 @@
   * 
-%E8%BF%94%E5%9B%9E%E4%B8%8B%E4%B8%80%E4%B8%AA%E8%A6%81%E6%8A%93%E5%8F%96%E7%9A%84%E9%93%BE%E6%8E%A5
+get an url to crawl
 %0A   
@@ -556,60 +556,58 @@
 ask 
-%E5%AE%9A%E4%B9%89%E7%9A%84%E4%BB%BB%E5%8A%A1%EF%BC%8C%E4%BB%A5%E6%BB%A1%E8%B6%B3%E5%8D%95Scheduler%E5%A4%9ATask%E7%9A%84%E6%83%85%E5%86%B5%0A     * @return %E4%B8%8B%E4%B8%80%E4%B8%AA%E8%A6%81%E6%8A%93%E5%8F%96%E7%9A%84%E9%93%BE%E6%8E%A5
+the task of spider%0A     * @return the url to crawl
 %0A   

update some comments