All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.fit2cloud.quartz.QuartzInstanceIdGenerator Maven / Gradle / Ivy

package com.fit2cloud.quartz;

import org.quartz.spi.InstanceIdGenerator;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class QuartzInstanceIdGenerator implements InstanceIdGenerator {
    @Override
    public String generateInstanceId() {
        try {
            return InetAddress.getLocalHost().getHostName() + System.currentTimeMillis();
        } catch (UnknownHostException e) {
            return "unknown-" + System.currentTimeMillis();
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy