Package jmt.engine.QueueNet

Examples of jmt.engine.QueueNet.GlobalJobInfoList


        //remove job from node list
        JobInfoList local = getOwnerNode().getJobInfoList();
        local.remove(local.lookFor(job));
        //remove job from station list
        jobsList.remove(jobsList.lookFor(job));
        GlobalJobInfoList global = getOwnerNode().getQueueNet().getJobInfoList();
        global.performJobClassSwitch(job, getJobClasses().get(jobClassOut));
        sendForward(message.getEvent(), job, 0.0);
     
        break;
      case NetEvent.EVENT_STOP:
        break;
View Full Code Here


        if (jobData != null) {
          info.remove(jobData);
        }

        // Gets global jobInfoList
        GlobalJobInfoList global = getOwnerNode().getQueueNet().getJobInfoList();

        // Sends "jobsPerLink" jobs on each output link
        Iterator<NetNode> i = output.listIterator();
        while (i.hasNext()) {
          NetNode outNode = i.next();
          for (int n = 0; n < jobsPerLink; n++) {
            ForkJob newJob = new ForkJob(numOut, job, this);
            // Sends new job to all following stations
            send(newJob, 0.0, outNode);
            // Adds job to system jobinfolist
            global.addForkedJob(newJob);
          }
        }
        // Increment job counter
        jobNum++;

        // Removes original job, otherwise we will have one extra job in the network
        global.removeForkedJob(job);
        break;

      case NetEvent.EVENT_ACK:
        ackCount++;
        // If this fork doesn't block, sends ACK back when all messages are delivered
View Full Code Here

          if (jobData != null) {
            info.remove(jobData);
          }

          // Removes job from system list
          GlobalJobInfoList global = getOwnerNode().getQueueNet().getJobInfoList();
          global.removeForkedJob(fJob);

          // Needed pieces
          int needed;
          if (jobs.containsKey(fJob.getForkedJob())) {
            needed = jobs.get(fJob.getForkedJob()).intValue();
          } else {
            needed = fJob.getForkedNumber();
            // As we are waiting for other fragments, adds merged job to global and local info list
            JobInfo merged = new JobInfo(fJob.getForkedJob());
            info.add(merged);
            jobsList.add(merged);
          }
          // Decrement needed as we received this job
          needed--;

          // If needed is zero, all pieces has been retrived and job can be
          // fowarded
          if (needed == 0) {
            jobs.remove(fJob.getForkedJob());
            // Adds original job, otherwise we will have one less job in the network
            global.addForkedJob(fJob.getForkedJob());
            // Sends job forward
            sendForward(fJob.getForkedJob(), 0.0);
            // Notify fork node (to support blocking)
            send(NetEvent.EVENT_JOIN, fJob.getForkedJob(), 0.0, fJob.getReferenceFork().getSectionID(), fJob.getReferenceFork()
                .getOwnerNode());
View Full Code Here

TOP

Related Classes of jmt.engine.QueueNet.GlobalJobInfoList

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.