diff options
Diffstat (limited to 'src/main/java/io/trygvis/queue/QueueService.java')
-rw-r--r-- | src/main/java/io/trygvis/queue/QueueService.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main/java/io/trygvis/queue/QueueService.java b/src/main/java/io/trygvis/queue/QueueService.java new file mode 100644 index 0000000..2111013 --- /dev/null +++ b/src/main/java/io/trygvis/queue/QueueService.java @@ -0,0 +1,17 @@ +package io.trygvis.queue; + +import java.sql.SQLException; +import java.util.Date; +import java.util.List; + +public interface QueueService { + void consume(Queue queue, TaskEffect effect) throws SQLException; + + Queue getQueue(String name, int interval, boolean autoCreate) throws SQLException; + + void schedule(Queue queue, Date scheduled, List<String> arguments) throws SQLException; + + public static interface TaskEffect { + List<Task> consume(Task task) throws Exception; + } +} |