Package us.codecraft.webmagic.scheduler
Class RedisPriorityScheduler
java.lang.Object
us.codecraft.webmagic.scheduler.DuplicateRemovedScheduler
us.codecraft.webmagic.scheduler.RedisScheduler
us.codecraft.webmagic.scheduler.RedisPriorityScheduler
- All Implemented Interfaces:
us.codecraft.webmagic.scheduler.component.DuplicateRemover
,us.codecraft.webmagic.scheduler.MonitorableScheduler
,us.codecraft.webmagic.scheduler.Scheduler
the redis scheduler with priority
- Author:
- sai Created by sai on 16-5-27.
-
Field Summary
Fields inherited from class us.codecraft.webmagic.scheduler.RedisScheduler
pool
Fields inherited from class us.codecraft.webmagic.scheduler.DuplicateRemovedScheduler
logger
-
Constructor Summary
ConstructorDescriptionRedisPriorityScheduler
(String host) RedisPriorityScheduler
(redis.clients.jedis.JedisPool pool) -
Method Summary
Modifier and TypeMethodDescriptionus.codecraft.webmagic.Request
poll
(us.codecraft.webmagic.Task task) protected void
pushWhenNoDuplicate
(us.codecraft.webmagic.Request request, us.codecraft.webmagic.Task task) void
resetDuplicateCheck
(us.codecraft.webmagic.Task task) Methods inherited from class us.codecraft.webmagic.scheduler.RedisScheduler
getItemKey, getLeftRequestsCount, getQueueKey, getSetKey, getTotalRequestsCount, isDuplicate
Methods inherited from class us.codecraft.webmagic.scheduler.DuplicateRemovedScheduler
getDuplicateRemover, noNeedToRemoveDuplicate, push, setDuplicateRemover, shouldReserved
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface us.codecraft.webmagic.scheduler.Scheduler
push
-
Constructor Details
-
RedisPriorityScheduler
-
RedisPriorityScheduler
public RedisPriorityScheduler(redis.clients.jedis.JedisPool pool)
-
-
Method Details
-
pushWhenNoDuplicate
protected void pushWhenNoDuplicate(us.codecraft.webmagic.Request request, us.codecraft.webmagic.Task task) - Overrides:
pushWhenNoDuplicate
in classRedisScheduler
-
poll
public us.codecraft.webmagic.Request poll(us.codecraft.webmagic.Task task) - Specified by:
poll
in interfaceus.codecraft.webmagic.scheduler.Scheduler
- Overrides:
poll
in classRedisScheduler
-
resetDuplicateCheck
public void resetDuplicateCheck(us.codecraft.webmagic.Task task) - Specified by:
resetDuplicateCheck
in interfaceus.codecraft.webmagic.scheduler.component.DuplicateRemover
- Overrides:
resetDuplicateCheck
in classRedisScheduler
-