Terracotta Quartz User Guide : Using Quartz Scheduler Where : Understanding Generated Node IDs
Understanding Generated Node IDs
Terracotta clients each run an instance of a clustered Quartz Scheduler scheduler. Every instance of this clustered scheduler must use the same scheduler name, specified in quartz.properties. For example:
# Name the clustered scheduler.
org.quartz.scheduler.instanceName = myScheduler
myScheduler’s data is shared across the cluster by each of its instances. However, every instance of myScheduler must also be identified uniquely, and this unique ID is specified in quartz.properties by the property org.quartz.scheduler.instanceId. This property should have one of the following values:
*A string value that identifies the scheduler instance running on the Terracotta client that loaded the containing quartz.properties. Each scheduler instance must have a unique ID value.
*AUTO – Delegates the generation of unique instance IDs to the class specified by the property org.quartz.scheduler.instanceIdGenerator.class.
For example, you can set org.quartz.scheduler.instanceId to "node1" on one node, "node2" on another node, and so on.
If you set org.quartz.scheduler.instanceId equal to "AUTO", then you should specify a generator class in quartz.properties using the property org.quartz.scheduler.instanceIdGenerator.class. This property can have one of the values listed in the following table.
Value
Notes
org.quartz.simpl.
HostnameInstanceIdGenerator
Returns the hostname as the instance ID.
org.quartz.simpl.
SystemPropertyInstanceIdGenerator
Returns the value of the org.quartz.scheduler.instanceId system property. Available with Quartz 2.0 or higher.
org.quartz.simpl.
SimpleInstanceIdGenerator
Returns an instance ID composed of the local hostname with the current timestamp appended. Ensures a unique name. If you do not specify a generator class, this generator class is used by default. However, this class is not suitable for use with Quartz Scheduler Where because the IDs it generates are not predictable.
Custom
Specify your own implementation of the interface org.quartz.spi.InstanceIdGenerator.
Copyright © 2010-2016 Software AG, Darmstadt, Germany.

Product Logo |   Feedback