diff --git a/ebean-api/src/main/java/io/ebean/BackgroundExecutor.java b/ebean-api/src/main/java/io/ebean/BackgroundExecutor.java index f553933db..4941f2058 100644 --- a/ebean-api/src/main/java/io/ebean/BackgroundExecutor.java +++ b/ebean-api/src/main/java/io/ebean/BackgroundExecutor.java @@ -39,26 +39,6 @@ public interface BackgroundExecutor { */ void execute(Runnable task); - /** - * Deprecated - migrate to scheduleWithFixedDelay(). - * Execute a task periodically with a fixed delay between each execution. - *
- * For example, execute a runnable every minute. - *
- * The delay is the time between executions no matter how long the task took. - * That is, this method has the same behaviour characteristics as - * {@link ScheduledExecutorService#scheduleWithFixedDelay(Runnable, long, long, TimeUnit)} - */ - @Deprecated - void executePeriodically(Runnable task, long delay, TimeUnit unit); - - /** - * Deprecated - migrate to scheduleWithFixedDelay(). - * Execute a task periodically additionally with an initial delay different from delay. - */ - @Deprecated - void executePeriodically(Runnable task, long initialDelay, long delay, TimeUnit unit); - /** * Execute a task periodically with a given delay. * diff --git a/ebean-core/src/main/java/io/ebeaninternal/server/executor/DefaultBackgroundExecutor.java b/ebean-core/src/main/java/io/ebeaninternal/server/executor/DefaultBackgroundExecutor.java index 6e49ff255..b4c13a8bd 100644 --- a/ebean-core/src/main/java/io/ebeaninternal/server/executor/DefaultBackgroundExecutor.java +++ b/ebean-core/src/main/java/io/ebeaninternal/server/executor/DefaultBackgroundExecutor.java @@ -100,22 +100,11 @@ public final class DefaultBackgroundExecutor implements SpiBackgroundExecutor { return pool.submit(wrap(task)); } - @Override public void execute(Runnable task) { submit(logExceptions(task)); } - @Override - public void executePeriodically(Runnable task, long delay, TimeUnit unit) { - schedulePool.scheduleWithFixedDelay(wrap(logExceptions(task)), delay, delay, unit); - } - - @Override - public void executePeriodically(Runnable task, long initialDelay, long delay, TimeUnit unit) { - schedulePool.scheduleWithFixedDelay(wrap(logExceptions(task)), initialDelay, delay, unit); - } - @Override public ScheduledFuture> scheduleWithFixedDelay(Runnable task, long initialDelay, long delay, TimeUnit unit) { return schedulePool.scheduleWithFixedDelay(wrap(logExceptions(task)), initialDelay, delay, unit);