package io.trygvis.queue; import org.quartz.SchedulerException; import java.util.List; public interface AsyncService { /** * @param name * @param interval how often the queue should be polled for missed tasks in seconds. * @param callable * @return * @throws SchedulerException */ Queue registerQueue(String name, int interval, AsyncCallable callable) throws SchedulerException; Queue getQueue(String name); Task schedule(Queue queue, String... args); /** * Polls for a new state of the execution. */ Task update(Task ref); interface AsyncCallable { void run(List arguments) throws Exception; } }