public class SchedulerServiceImpl extends Object implements SchedulerService
Constructor and Description |
---|
SchedulerServiceImpl() |
Modifier and Type | Method and Description |
---|---|
ScheduledExecutorService |
getScheduleExecutorService()
Use this method to get a
ScheduledExecutorService
and execute your task with it instead of using Timer |
ScheduledExecutorService |
getSharedScheduleExecutorService()
Same as getScheduleExecutorService but use a shared pool of ScheduledExecutor instead of single one.
|
static long |
getTimeDiffInSeconds(int hourInUtc,
ZonedDateTime now) |
void |
postConstruct() |
void |
preDestroy() |
void |
setThreadPoolSize(int threadPoolSize) |
public void postConstruct()
public void preDestroy()
public void setThreadPoolSize(int threadPoolSize)
public ScheduledExecutorService getScheduleExecutorService()
SchedulerService
ScheduledExecutorService
and execute your task with it instead of using Timer
getScheduleExecutorService
in interface SchedulerService
ScheduledExecutorService
public ScheduledExecutorService getSharedScheduleExecutorService()
SchedulerService
getSharedScheduleExecutorService
in interface SchedulerService
ScheduledExecutorService
public static long getTimeDiffInSeconds(int hourInUtc, ZonedDateTime now)
Copyright © 2014–2022 Apache Software Foundation. All rights reserved.