public class HostnameInstanceIdGenerator extends Object implements IInstanceIdGenerator
InstanceIdGenerator that 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.
IInstanceIdGenerator,
SimpleInstanceIdGenerator| Constructor and Description |
|---|
HostnameInstanceIdGenerator() |
| Modifier and Type | Method and Description |
|---|---|
String |
generateInstanceId()
Generate the instance id for a
Scheduler |
public String generateInstanceId() throws SchedulerException
IInstanceIdGeneratorSchedulergenerateInstanceId in interface IInstanceIdGeneratorSchedulerExceptionCopyright © 2016–2021 Philip Helger. All rights reserved.