Interface RecurringTask

  • All Superinterfaces:
    HasMessageKey, Runnable

    public interface RecurringTask
    extends Runnable, HasMessageKey
    A RecurringTask is a task which keeps looking for available data to be processed. By definition, RecurringTasks should be idempotent, that is, running the same task over and over again should only process data which hasn't been processed yet.
    Each RecurringTask runs in a task scheduler, and are scheduled on Cyclos startup. A RecurringTask should resolve its first execution date and then the next execution date. However, a RecurringTask can be awaken by services. So, if a service knows something will be immediately available for processing, it can use the RecurringTaskHandler.scheduleAwake(Class) method. The will cause the recurring task to run right after the service transaction is committed. This is important, because if the task would run before the service transaction commits, it wouldn't probably find the data to be processed.
    • Method Detail

      • getName

        String getName()
        Returns the task name
      • getNotesForLogging

        String getNotesForLogging()
        Returns an optional text to be logged only server-side at start up