Class Scheduler

java.lang.Object
io.github.javactrl.kafka.Scheduler

@Ctrl public class Scheduler extends Object
Demo-only, not for production time scheduler. Write a record with a string key "{first part}|{second part}" and a delay value number (as a string). It will post a record with key "{first part}" and value "{second part}" after the original record timestamp plus the received delay. If the delay value is "0" the corresponding job will be canceled.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Apach Kafka Streams Processor implementing the workflow run implementation
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    main(String[] args)
    Command line entry point Expects bootstrap servers address or it's "localhost:9092" if not specified.
    static void
    sleep(long duration, TimeUnit durationUnits)
    Suspends the current thread execution for the specified amount of time.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • sleep

      public static void sleep(long duration, TimeUnit durationUnits) throws io.github.javactrl.rt.CThrowable
      Suspends the current thread execution for the specified amount of time.
      Parameters:
      duration - duration's value
      durationUnits - duration's unit
      Throws:
      io.github.javactrl.rt.CThrowable - always throws, since this always suspends
    • main

      public static void main(String[] args)
      Command line entry point Expects bootstrap servers address or it's "localhost:9092" if not specified.
      Parameters:
      args - command line arguments