Package org.apache.camel.component.wal
Class DefaultLogSupervisor
java.lang.Object
org.apache.camel.component.wal.DefaultLogSupervisor
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionDefaultLogSupervisor(long interval) Constructs a new log supervisorDefaultLogSupervisor(long interval, ScheduledExecutorService scheduledExecutorService) Constructs a new log supervisor -
Method Summary
-
Constructor Details
-
DefaultLogSupervisor
public DefaultLogSupervisor(long interval) Constructs a new log supervisor- Parameters:
interval- the interval between executions of the task
-
DefaultLogSupervisor
Constructs a new log supervisor- Parameters:
interval- the interval between executions of the taskscheduledExecutorService- the executor service to use for running the task
-
-
Method Details
-
start
Description copied from interface:LogSupervisorStarts the flush policy- Specified by:
startin interfaceLogSupervisor- Parameters:
runnable- the code to be executed by the log supervisor
-
stop
public void stop()Description copied from interface:LogSupervisorStops the policy- Specified by:
stopin interfaceLogSupervisor
-