Package org.quartz.simpl
Class HostnameInstanceIdGenerator
- java.lang.Object
-
- org.quartz.simpl.HostnameInstanceIdGenerator
-
- All Implemented Interfaces:
InstanceIdGenerator
public class HostnameInstanceIdGenerator extends java.lang.Object implements InstanceIdGenerator
InstanceIdGeneratorthat names the scheduler instance using just the machine hostname.This class is useful when you know that your scheduler instance will be the only one running on a particular machine. Each time the scheduler is restarted, it will get the same instance id as long as the machine is not renamed.
- See Also:
InstanceIdGenerator,SimpleInstanceIdGenerator
-
-
Constructor Summary
Constructors Constructor Description HostnameInstanceIdGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgenerateInstanceId()Generate the instance id for aScheduler
-
-
-
Method Detail
-
generateInstanceId
public java.lang.String generateInstanceId() throws SchedulerExceptionDescription copied from interface:InstanceIdGeneratorGenerate the instance id for aScheduler- Specified by:
generateInstanceIdin interfaceInstanceIdGenerator- Returns:
- The clusterwide unique instance id.
- Throws:
SchedulerException
-
-