Package com.stella.framework.job

Examples of com.stella.framework.job.Job


    boolean batchIsExhausted = false;
   
    while(batchIsExhausted != true) {

      // TODO: make this use a semaphore
      Job job = readyQueue.getNextJob();
     
      if(job == null) {
       
        if(runQueue.getRunningJobCount() <= 0) {
         
          if(checkIfAnyJobIsReady() == false) {
            logger.info("all queues exhausted.");
            batchIsExhausted = true;
          }
        }
     
      } else {
       
        // this is blocking
        if(runQueue.hasCapacity()) {
          runQueue.addJob(job);
        } else {
          logger.error("*** WE SHOULD NEVER GET HERE** [" + job.getName() + "]");
        }
      }
    }
   
    runQueue.waitForCompletion();
View Full Code Here

TOP

Related Classes of com.stella.framework.job.Job

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.