Package jmt.engine.QueueNet

Examples of jmt.engine.QueueNet.NodeList


   * the representation of classes and servers at CommonModel level (by a Key) and
   * the representation at engine level
   */
  public void initialize() {
    QueueNetwork net = dispatcher.getSimulation().getNetwork();
    NodeList nodeList = net.getNodes();
    JobClassList classList = net.getJobClasses();
    TreeMap<String, Object> tm = new TreeMap<String, Object>();
    //a TreeMap is used to speedup the following code
    for (int j = 0; j < servers.size(); j++) {
      Object thisKey = servers.get(j);
      String thisName = mediator.getStationDefinition().getStationName(thisKey);
      tm.put(thisName, thisKey);
    }
    //performs the server mapping
    for (int i = 0; i < nodeList.size(); i++) {
      NetNode temp = nodeList.get(i);
      NodeSection serviceSection = null;
      try {
        serviceSection = temp.getSection(NodeSection.SERVICE);
      } catch (NetException ne) {
      }
View Full Code Here


    Job job;
    job = message.getJob();
    // Finds event type
    switch (message.getEvent()) {
      case NetEvent.EVENT_JOB:
        NodeList output = getOwnerNode().getOutputNodes();
        // Finds number of output jobs
        numOut = output.size() * jobsPerLink;
        // Resets ack count
        ackCount = 0;

        // Removes job from global node list
        JobInfoList info = getOwnerNode().getJobInfoList();
        JobInfo jobData = info.lookFor(job);
        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
View Full Code Here

TOP

Related Classes of jmt.engine.QueueNet.NodeList

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.