i am working on an application that works with an array of async calculations.
heres how the job cerated:
List<F.Promise<PredictionCalculator>> promises = new ArrayList<F.Promise<PredictionCalculator>>();
predictWithJobResult pj = new predictWithJobResult(parameter).now;
promises.add(pj)
i do this for n number of times, and after adding jobs to the queue, i execure this code:
promises.notifyAll();
so jobs are starting to run, my problem is, this job is running on every 60mins. so if there is a job already running with “x” parameter, it has to skip adding this job into the queue again.
So my question is, how can i query running jobs and their parameters? is it possible?
Why not build a running job queue object (Singleton) which you can query in which jobs check for their paramaters on the queue before running, add themselves while running, and remove themselves when finished.