Class DefaultLogSupervisor

java.lang.Object
org.apache.camel.component.wal.DefaultLogSupervisor
All Implemented Interfaces:
LogSupervisor

public class DefaultLogSupervisor extends Object implements LogSupervisor
A log supervisor that runs in the background executing a task in the background. It is used to flush the data to disk at regular intervals
  • Constructor Details

    • DefaultLogSupervisor

      public DefaultLogSupervisor(long interval)
      Constructs a new log supervisor
      Parameters:
      interval - the interval between executions of the task
    • DefaultLogSupervisor

      public DefaultLogSupervisor(long interval, ScheduledExecutorService scheduledExecutorService)
      Constructs a new log supervisor
      Parameters:
      interval - the interval between executions of the task
      scheduledExecutorService - the executor service to use for running the task
  • Method Details

    • start

      public void start(Runnable runnable)
      Description copied from interface: LogSupervisor
      Starts the flush policy
      Specified by:
      start in interface LogSupervisor
      Parameters:
      runnable - the code to be executed by the log supervisor
    • stop

      public void stop()
      Description copied from interface: LogSupervisor
      Stops the policy
      Specified by:
      stop in interface LogSupervisor