SystemPropertyInstanceIdGenerator (Quartz Parent POM 2.0.1 API)

Quartz Java



org.quartz.simpl Class SystemPropertyInstanceIdGenerator

java.lang.Object
  extended by org.quartz.simpl.SystemPropertyInstanceIdGenerator
All Implemented Interfaces:
org.quartz.spi.InstanceIdGenerator

public class SystemPropertyInstanceIdGenerator
extends Object
implements org.quartz.spi.InstanceIdGenerator

InstanceIdGenerator that will use a system property to configure the scheduler. If no value set for the property, a SchedulerException is thrown

Author:
Alex Snaps

Field Summary
static String SYSTEM_PROPERTY
          System property to read the instanceId from
 
Constructor Summary
SystemPropertyInstanceIdGenerator()
           
 
Method Summary
 String generateInstanceId()
          Returns the cluster wide value for this scheduler instance's id, based on a system property
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SYSTEM_PROPERTY

public static final String SYSTEM_PROPERTY
System property to read the instanceId from

See Also:
Constant Field Values

Constructor Detail

SystemPropertyInstanceIdGenerator

public SystemPropertyInstanceIdGenerator()
Method Detail

generateInstanceId

public String generateInstanceId()
                          throws SchedulerException
Returns the cluster wide value for this scheduler instance's id, based on a system property

Specified by:
generateInstanceId in interface org.quartz.spi.InstanceIdGenerator
Returns:
the value of the system property
Throws:
SchedulerException - Shouldn't a value be found


Copyright 2001-2011, Terracotta, Inc.