Class CronTriggerer

java.lang.Object
org.apache.pulsar.io.batchdiscovery.CronTriggerer
All Implemented Interfaces:
org.apache.pulsar.io.core.BatchSourceTriggerer

public class CronTriggerer extends Object implements org.apache.pulsar.io.core.BatchSourceTriggerer
This 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 Details

  • Constructor Details

    • CronTriggerer

      public CronTriggerer()
  • Method Details

    • init

      public void init(Map<String,Object> config, org.apache.pulsar.io.core.SourceContext sourceContext)
      Specified by:
      init in interface org.apache.pulsar.io.core.BatchSourceTriggerer
    • start

      public void start(Consumer<String> trigger)
      Specified by:
      start in interface org.apache.pulsar.io.core.BatchSourceTriggerer
    • stop

      public void stop()
      Specified by:
      stop in interface org.apache.pulsar.io.core.BatchSourceTriggerer