Class AbstractProcessor

java.lang.Object
io.debezium.connector.cassandra.AbstractProcessor
Direct Known Subclasses:
CommitLogPostProcessor, QueueProcessor, SnapshotProcessor

public abstract class AbstractProcessor extends Object
An abstract processor designed to be a convenient superclass for all concrete processors for Cassandra connector task. The class handles concurrency control for starting and stopping the processor.
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • name

      private final String name
    • delayMs

      private final long delayMs
    • running

      private boolean running
  • Constructor Details

    • AbstractProcessor

      public AbstractProcessor(String name, Duration delay)
  • Method Details

    • process

      public abstract void process() throws InterruptedException, IOException
      The actual work the processor is doing. This method will be executed in a while loop until processor stops or encounters exception.
      Throws:
      InterruptedException
      IOException
    • initialize

      public void initialize() throws Exception
      Override initialize to initialize resources before starting the processor
      Throws:
      Exception
    • destroy

      public void destroy() throws Exception
      Override destroy to clean up resources after stopping the processor
      Throws:
      Exception
    • isRunning

      public boolean isRunning()
    • start

      public void start() throws Exception
      Throws:
      Exception
    • stop

      public void stop()
    • getName

      public String getName()