org.daisy.pipeline.tts.scheduler.Scheduler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tts-common Show documentation
Show all versions of tts-common Show documentation
Common API for TTS functionality
package org.daisy.pipeline.tts.scheduler;
/**
* Scheduler interface to launch schedulable actions.
*
* A schedulable action must be reschedule when a RecoverableError is raised.
*
* An example of implementation is provided in the ExponentialBackoffScheduler
*
* @author Louis Caille @ braillenet
*
* @param the schedulable action class to handle
*/
public interface Scheduler {
/**
* Launch an action from the queue.
*
* @param scheduled the action to launch
* @throws InterruptedException if the scheduler thread is interrupted
* @throws FatalError if the action could not be executed or rescheduled after a RecoverableError
*/
public void launch(Action scheduled) throws InterruptedException, FatalError;
}