@Override protected <V> RunnableScheduledFuture<V> decorateTask(Runnable runnable, RunnableScheduledFuture<V> task) { return new SchedulableTask<>(runnable, null, task); }
@Override public void run() { if (isPeriodic()) { innerTask.run(); } else { // Decoration of tasks doesn't play well with one-off tasks. Executing without using the innerTask. super.run(); } }
@Override protected <V> RunnableScheduledFuture<V> decorateTask(Callable<V> callable, RunnableScheduledFuture<V> task) { return new SchedulableTask<>(callable, task); }