public final class SchedulingServiceImpl extends Object implements SchedulingServiceSPI
Synchronized since statement creation and event evaluation by multiple (event send) threads can lead to callbacks added/removed asynchronously.
Constructor and Description |
---|
SchedulingServiceImpl(int stageId,
com.espertech.esper.common.internal.schedule.TimeSourceService timeSourceService,
ZoneId defaultFormatterTimeZone)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(long afterTime,
com.espertech.esper.common.internal.schedule.ScheduleHandle handle,
long slot) |
void |
destroy() |
void |
evaluate(Collection<com.espertech.esper.common.internal.schedule.ScheduleHandle> handles) |
DateTimeFormatter |
getDefaultFormatter() |
Long |
getFurthestTimeHandle() |
String |
getFurthestTimeHandleDate() |
Long |
getNearestTimeHandle() |
String |
getNearestTimeHandleDate() |
int |
getScheduleHandleCount() |
long |
getTime() |
int |
getTimeHandleCount() |
void |
init()
Initialization is optional and provides a chance to preload things after statements are available.
|
boolean |
isScheduled(com.espertech.esper.common.internal.schedule.ScheduleHandle handle) |
void |
remove(com.espertech.esper.common.internal.schedule.ScheduleHandle handle,
long slot) |
void |
setTime(long currentTime) |
void |
transfer(Set<Integer> statementIds,
SchedulingServiceSPI schedulingService) |
void |
visitSchedules(ScheduleVisitor visitor) |
public SchedulingServiceImpl(int stageId, com.espertech.esper.common.internal.schedule.TimeSourceService timeSourceService, ZoneId defaultFormatterTimeZone)
timeSourceService
- time source providerstageId
- stage id or -1 when not applicabledefaultFormatterTimeZone
- time zone for audit formatterpublic void destroy()
destroy
in interface com.espertech.esper.common.internal.schedule.SchedulingService
public long getTime()
getTime
in interface com.espertech.esper.common.internal.schedule.TimeProvider
public final void setTime(long currentTime)
setTime
in interface com.espertech.esper.common.internal.schedule.SchedulingService
public final void add(long afterTime, com.espertech.esper.common.internal.schedule.ScheduleHandle handle, long slot) throws com.espertech.esper.common.internal.schedule.ScheduleServiceException
add
in interface com.espertech.esper.common.internal.schedule.SchedulingService
com.espertech.esper.common.internal.schedule.ScheduleServiceException
public final void remove(com.espertech.esper.common.internal.schedule.ScheduleHandle handle, long slot)
remove
in interface com.espertech.esper.common.internal.schedule.SchedulingService
public final void evaluate(Collection<com.espertech.esper.common.internal.schedule.ScheduleHandle> handles)
evaluate
in interface com.espertech.esper.common.internal.schedule.SchedulingService
public void transfer(Set<Integer> statementIds, SchedulingServiceSPI schedulingService)
transfer
in interface SchedulingServiceSPI
public void init()
SchedulingServiceSPI
init
in interface SchedulingServiceSPI
public int getTimeHandleCount()
getTimeHandleCount
in interface com.espertech.esper.common.internal.schedule.SchedulingService
public String getFurthestTimeHandleDate()
public String getNearestTimeHandleDate()
public Long getFurthestTimeHandle()
getFurthestTimeHandle
in interface com.espertech.esper.common.internal.schedule.SchedulingService
public int getScheduleHandleCount()
getScheduleHandleCount
in interface com.espertech.esper.common.internal.schedule.SchedulingService
public boolean isScheduled(com.espertech.esper.common.internal.schedule.ScheduleHandle handle)
isScheduled
in interface com.espertech.esper.common.internal.schedule.SchedulingService
public Long getNearestTimeHandle()
getNearestTimeHandle
in interface SchedulingServiceSPI
public void visitSchedules(ScheduleVisitor visitor)
visitSchedules
in interface SchedulingServiceSPI
public DateTimeFormatter getDefaultFormatter()
getDefaultFormatter
in interface com.espertech.esper.common.internal.schedule.TimeProvider
Copyright © 2005–2020. All rights reserved.