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