Interface ScriptLoadingExecutor
-
- All Superinterfaces:
Executor
public interface ScriptLoadingExecutor extends Executor
A simplified scheduler forScriptLoaders.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description AutoCloseablescheduleAtFixedRate(Runnable task, long time, TimeUnit unit)Schedules a task to run at a fixed rate, with the first execution occurring with no delay.static ScriptLoadingExecutorusingJavaScheduler(ScheduledExecutorService service)Creates aScriptLoadingExecutorusing a java executor service
-
-
-
Method Detail
-
usingJavaScheduler
static ScriptLoadingExecutor usingJavaScheduler(ScheduledExecutorService service)
Creates aScriptLoadingExecutorusing a java executor service- Parameters:
service- the service- Returns:
- a new loading scheduler
-
scheduleAtFixedRate
AutoCloseable scheduleAtFixedRate(Runnable task, long time, TimeUnit unit)
Schedules a task to run at a fixed rate, with the first execution occurring with no delay.- Parameters:
task- the tasktime- the timeunit- the unit of the time- Returns:
- an
AutoCloseable, which will cancel the task whenclosed. - See Also:
ScheduledExecutorService.scheduleAtFixedRate(Runnable, long, long, TimeUnit)
-
-