YhScheduleInstanceIdGenerator.java
608 Bytes
package com.yoho.quartz.scheduler;
import com.yoho.core.common.utils.LocalIp;
import com.yoho.quartz.exception.JobException;
import com.yoho.quartz.utils.JobInstanceUtils;
import org.quartz.SchedulerException;
import org.quartz.spi.InstanceIdGenerator;
import java.lang.management.ManagementFactory;
/**
* Author:yanzhang.fu
* Date:2017/12/18
* Description:
* Modified By:
**/
public class YhScheduleInstanceIdGenerator implements InstanceIdGenerator {
@Override
public String generateInstanceId() throws SchedulerException {
return JobInstanceUtils.generateInstanceId();
}
}