package io.trygvis.queue; import java.sql.SQLException; import java.util.Date; import java.util.List; public interface QueueService { void consume(Queue queue, TaskExecutionRequest req, TaskEffect effect) throws SQLException; Queue getQueue(String name, int interval, boolean autoCreate) throws SQLException; void schedule(Queue queue, Date scheduled, List arguments) throws SQLException; public static class TaskExecutionRequest { public final boolean stopOnError; // TODO: saveExceptions public TaskExecutionRequest(boolean stopOnError) { this.stopOnError = stopOnError; } } }