Package org.quartz
Class TriggerKey
- java.lang.Object
-
- org.quartz.utils.Key<TriggerKey>
-
- org.quartz.TriggerKey
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<Key<TriggerKey>>
public final class TriggerKey extends Key<TriggerKey>
Uniquely identifies aTrigger.Keys are composed of both a name and group, and the name must be unique within the group. If only a name is specified then the default group name will be used.
Quartz provides a builder-style API for constructing scheduling-related entities via a Domain-Specific Language (DSL). The DSL can best be utilized through the usage of static imports of the methods on the classes
TriggerBuilder,JobBuilder,DateBuilder,JobKey,TriggerKeyand the variousScheduleBuilderimplementations.Client code can then use the DSL to write code such as this:
JobDetail job = newJob(MyJob.class) .withIdentity("myJob") .build(); Trigger trigger = newTrigger() .withIdentity(triggerKey("myTrigger", "myTriggerGroup")) .withSchedule(simpleSchedule() .withIntervalInHours(1) .repeatForever()) .startAt(futureDate(10, MINUTES)) .build(); scheduler.scheduleJob(job, trigger);- See Also:
Trigger,Key.DEFAULT_GROUP, Serialized Form
-
-
Field Summary
-
Fields inherited from class org.quartz.utils.Key
DEFAULT_GROUP
-
-
Constructor Summary
Constructors Constructor Description TriggerKey(java.lang.String name)TriggerKey(java.lang.String name, java.lang.String group)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TriggerKeytriggerKey(java.lang.String name)static TriggerKeytriggerKey(java.lang.String name, java.lang.String group)
-
-
-
Method Detail
-
triggerKey
public static TriggerKey triggerKey(java.lang.String name)
-
triggerKey
public static TriggerKey triggerKey(java.lang.String name, java.lang.String group)
-
-