Class CronTriggerer
- java.lang.Object
-
- org.apache.pulsar.io.batchdiscovery.CronTriggerer
-
- All Implemented Interfaces:
org.apache.pulsar.io.core.BatchSourceTriggerer
public class CronTriggerer extends java.lang.Object implements org.apache.pulsar.io.core.BatchSourceTriggererThis is an implementation of BatchSourceTriggerer that triggers based on a cron expression. BatchSource developers using this should pass the json string of a map that contains "__CRON__" key with the appropriate cron expression. The triggerer will trigger based on this expression.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCRON_KEY
-
Constructor Summary
Constructors Constructor Description CronTriggerer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinit(java.util.Map<java.lang.String,java.lang.Object> config, org.apache.pulsar.io.core.SourceContext sourceContext)voidstart(java.util.function.Consumer<java.lang.String> trigger)voidstop()
-
-
-
Field Detail
-
CRON_KEY
public static final java.lang.String CRON_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(java.util.Map<java.lang.String,java.lang.Object> config, org.apache.pulsar.io.core.SourceContext sourceContext)- Specified by:
initin interfaceorg.apache.pulsar.io.core.BatchSourceTriggerer
-
start
public void start(java.util.function.Consumer<java.lang.String> trigger)
- Specified by:
startin interfaceorg.apache.pulsar.io.core.BatchSourceTriggerer
-
stop
public void stop()
- Specified by:
stopin interfaceorg.apache.pulsar.io.core.BatchSourceTriggerer
-
-