Class TriggerKey

  extended by org.quartz.utils.Key<TriggerKey>
      extended by org.quartz.TriggerKey
All Implemented Interfaces:, java.lang.Comparable<Key>

public final class TriggerKey
extends Key<TriggerKey>

Uniquely identifies a Trigger.

Keys are composed of both a name and group, and the name must be unique within the group. If only a group 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, TriggerKey and the various ScheduleBuilder implementations.

Client code can then use the DSL to write code such as this:

         JobDetail job = newJob(MyJob.class)
         Trigger trigger = newTrigger() 
             .withIdentity(triggerKey("myTrigger", "myTriggerGroup"))
             .startAt(futureDate(10, MINUTES))
         scheduler.scheduleJob(job, trigger);

See Also:
Trigger, Key.DEFAULT_GROUP, Serialized Form

Field Summary
Fields inherited from class org.quartz.utils.Key
Constructor Summary
TriggerKey(java.lang.String name)
TriggerKey(java.lang.String name, java.lang.String group)
Method Summary
static TriggerKey triggerKey(java.lang.String name)
static TriggerKey triggerKey(java.lang.String name, java.lang.String group)
Methods inherited from class org.quartz.utils.Key
compareTo, createUniqueName, equals, getGroup, getName, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail


public TriggerKey(java.lang.String name)


public TriggerKey(java.lang.String name,
                  java.lang.String group)
Method Detail


public static TriggerKey triggerKey(java.lang.String name)


public static TriggerKey triggerKey(java.lang.String name,
                                    java.lang.String group)

Copyright 2001-2019, Terracotta, Inc.