Package io.siddhi.core.trigger
Class CronTrigger
- java.lang.Object
-
- io.siddhi.core.trigger.AbstractTrigger
-
- io.siddhi.core.trigger.CronTrigger
-
- All Implemented Interfaces:
Trigger,ExternalReferencedHolder,org.quartz.Job
public class CronTrigger extends AbstractTrigger implements org.quartz.Job
Implementation ofTriggerwhich will trigger events based on a cron expression.
-
-
Constructor Summary
Constructors Constructor Description CronTrigger()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute(org.quartz.JobExecutionContext jobExecutionContext)StringgetId()io.siddhi.query.api.definition.TriggerDefinitiongetTriggerDefinition()voidinit(io.siddhi.query.api.definition.TriggerDefinition triggerDefinition, SiddhiAppContext siddhiAppContext, StreamJunction streamJunction)booleanisStateful()voidstart()This will be called only once and this can be used to acquire required resources for the processing element.voidstop()This will be called only once and this can be used to release the acquired resources for processing.
-
-
-
Method Detail
-
init
public void init(io.siddhi.query.api.definition.TriggerDefinition triggerDefinition, SiddhiAppContext siddhiAppContext, StreamJunction streamJunction)- Specified by:
initin classAbstractTrigger
-
getTriggerDefinition
public io.siddhi.query.api.definition.TriggerDefinition getTriggerDefinition()
- Specified by:
getTriggerDefinitionin interfaceTrigger
-
start
public void start()
This will be called only once and this can be used to acquire required resources for the processing element. This will be called after initializing the system and before starting to process the events.- Specified by:
startin interfaceExternalReferencedHolder- Specified by:
startin interfaceTrigger
-
stop
public void stop()
This will be called only once and this can be used to release the acquired resources for processing. This will be called before shutting down the system.- Specified by:
stopin interfaceExternalReferencedHolder- Specified by:
stopin interfaceTrigger
-
execute
public void execute(org.quartz.JobExecutionContext jobExecutionContext) throws org.quartz.JobExecutionException- Specified by:
executein interfaceorg.quartz.Job- Throws:
org.quartz.JobExecutionException
-
isStateful
public boolean isStateful()
- Specified by:
isStatefulin interfaceTrigger
-
-