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

net.anotheria.asg.generator.GenerationJobManager Maven / Gradle / Ivy

package net.anotheria.asg.generator;

/**
 * 

GenerationJobManager class.

* * @author another * @version $Id: $Id */ public class GenerationJobManager { private GenerationJobManager() { } /** * Currently executed job. */ private static ThreadLocal currentJob = new ThreadLocal(){ @Override protected synchronized GenerationJob initialValue(){ return new GenerationJob(); } }; /** *

Getter for the field currentJob.

* * @return a {@link net.anotheria.asg.generator.GenerationJob} object. */ public static GenerationJob getCurrentJob(){ return currentJob.get(); } /** *

startNewJob.

*/ public static void startNewJob(){ currentJob.set(new GenerationJob()); } /** *

startNewJob.

* * @param artefact a {@link net.anotheria.asg.generator.GeneratedArtefact} object. */ public static void startNewJob(GeneratedArtefact artefact){ currentJob.set(new GenerationJob(artefact)); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy