Package org.apache.unomi.api.services
Interface SchedulerService
-
- All Known Implementing Classes:
SchedulerServiceImpl
public interface SchedulerServiceA service to centralize scheduling of tasks instead of using Timers or executors in each service https://stackoverflow.com/questions/409932/java-timer-vs-executorservice
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ScheduledExecutorServicegetScheduleExecutorService()Use this method to get aScheduledExecutorServiceand execute your task with it instead of usingTimerScheduledExecutorServicegetSharedScheduleExecutorService()Same as getScheduleExecutorService but use a shared pool of ScheduledExecutor instead of single one.
-
-
-
Method Detail
-
getScheduleExecutorService
ScheduledExecutorService getScheduleExecutorService()
Use this method to get aScheduledExecutorServiceand execute your task with it instead of usingTimer- Returns:
ScheduledExecutorService
-
getSharedScheduleExecutorService
ScheduledExecutorService getSharedScheduleExecutorService()
Same as getScheduleExecutorService but use a shared pool of ScheduledExecutor instead of single one. Use this service is your tasks can be run in parallel of the others.- Returns:
ScheduledExecutorService
-
-