org.quartz.simpl
Class SystemPropertyInstanceIdGenerator

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

public class SystemPropertyInstanceIdGenerator
extends java.lang.Object
implements 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 java.lang.String SYSTEM_PROPERTY
          System property to read the instanceId from
 
Constructor Summary
SystemPropertyInstanceIdGenerator()
           
 
Method Summary
 java.lang.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 java.lang.String SYSTEM_PROPERTY
System property to read the instanceId from

See Also:
Constant Field Values
Constructor Detail

SystemPropertyInstanceIdGenerator

public SystemPropertyInstanceIdGenerator()
Method Detail

generateInstanceId

public java.lang.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 InstanceIdGenerator
Returns:
the value of the system property
Throws:
SchedulerException - Shouldn't a value be found


Copyright 2001-2019, Terracotta, Inc.