Class CronTriggerer

  • All Implemented Interfaces:
    org.apache.pulsar.io.core.BatchSourceTriggerer

    public class CronTriggerer
    extends java.lang.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 Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CRON_KEY  
    • Constructor Summary

      Constructors 
      Constructor Description
      CronTriggerer()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void init​(java.util.Map<java.lang.String,​java.lang.Object> config, org.apache.pulsar.io.core.SourceContext sourceContext)  
      void start​(java.util.function.Consumer<java.lang.String> trigger)  
      void stop()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CronTriggerer

        public CronTriggerer()
    • 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:
        init in interface org.apache.pulsar.io.core.BatchSourceTriggerer
      • start

        public void start​(java.util.function.Consumer<java.lang.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