Class Scheduler
- java.lang.Object
-
- com.digitalpebble.stormcrawler.persistence.Scheduler
-
- Direct Known Subclasses:
DefaultScheduler
public abstract class Scheduler extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
schedulerClassParamName
Class to use for Scheduler.
-
Constructor Summary
Constructors Constructor Description Scheduler()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static Scheduler
getInstance(Map<String,Object> stormConf)
Returns a Scheduler instance based on the configuration *protected abstract void
init(Map<String,Object> stormConf)
Configuration of the scheduler based on the config.abstract Optional<Date>
schedule(Status status, Metadata metadata)
Returns an optional Date indicating when the document should be refetched next, based on its status.
-
-
-
Field Detail
-
schedulerClassParamName
public static final String schedulerClassParamName
Class to use for Scheduler. Must extend the class Scheduler.- See Also:
- Constant Field Values
-
-
Method Detail
-
init
protected abstract void init(Map<String,Object> stormConf)
Configuration of the scheduler based on the config. Should be called by Scheduler.getInstance() *
-
schedule
public abstract Optional<Date> schedule(Status status, Metadata metadata)
Returns an optional Date indicating when the document should be refetched next, based on its status. It is empty if the URL should never be refetched.
-
-