net.anotheria.asg.generator.GenerationJobManager Maven / Gradle / Ivy
package net.anotheria.asg.generator;
public class GenerationJobManager {
private GenerationJobManager() {
}
/**
* Currently executed job.
*/
private static ThreadLocal currentJob = new ThreadLocal(){
@Override
protected synchronized GenerationJob initialValue(){
return new GenerationJob();
}
};
public static GenerationJob getCurrentJob(){
return currentJob.get();
}
public static void startNewJob(){
currentJob.set(new GenerationJob());
}
public static void startNewJob(GeneratedArtefact artefact){
currentJob.set(new GenerationJob(artefact));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy