Package jmt.engine.QueueNet

Examples of jmt.engine.QueueNet.NetNode


    //maxJobCount = Double.MIN_VALUE;
    //for each server ...
    for (int i = 0; i < servers.size(); i++) {
      Object thisServerKey = servers.get(i);
      // get the mapped NetNode ...
      NetNode thisNode = serverMap.get(thisServerKey);
      NodeSection thisQueue = null;
      NodeSection thisServer = null;
      // get the input section and the service section ...
      try {
        thisQueue = thisNode.getSection(NodeSection.INPUT);
        thisServer = thisNode.getSection(NodeSection.SERVICE);
      } catch (NetException ne) {
      }
      singleServerContentQueues.clear();
      //for each class ...
      for (int j = 0; j < classes.size(); j++) {
View Full Code Here


        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
View Full Code Here

        //the routing strategy and a message containing the job is sent to it.

        JobClass jobClass = job.getJobClass();

        //choose the outNode using the corresponding routing strategy
        NetNode outNode = routingStrategies[jobClass.getId()].getOutNode(this, jobClass);
        // Bertoli Marco: sanity checks with closed classes and sinks were moved inside
        // routing strategies

        if (outNode == null) {
          return MSG_NOT_PROCESSED;
View Full Code Here

        distribution = new Empirical();
        param = new EmpiricalPar(probabilities);
    }

    public NetNode getOutNode(){
        NetNode node = null;
        if(nodes == null || nodes.length ==0){
            nodes = new NetNode[stationName.length];
            for(int n=0; (stationName != null && n<stationName.length); n++){
                nodes[n] = NetSystem.getNode(stationName[n]);
            }
View Full Code Here

        JobClass jobClass = job.getJobClass();

        //this job has been received by an internal node
        //the region input station will have to send it back
        NetNode realDestination = message.getSource();

        //adds a JobInfo object after modifying the job with redirection informations
        job.setOriginalDestinationNode(realDestination);
        jobsList.add(new JobInfo(job));
View Full Code Here

        job = message.getJob();

        //----REDIRECTION BEHAVIOUR----------//
        if (isRedirectionON()) {

          NetNode source = message.getSource();
          boolean fromTheInside = myRegion.belongsToRegion(source);

          //the first time input station isn't known yet
          if (regionInputStation == null) {
            regionInputStation = myRegion.getInputStation();
View Full Code Here

      case NetEvent.EVENT_JOB:
        // Sends the message to the real destination and wait for the ack
        Job job = message.getJob();
        //this is the real destination, i.e. the internal node that at first
        //had redirected the job to the input station
        NetNode realDestinationNode = job.getOriginalDestinationNode();
        send(job, 0.0, realDestinationNode);

        waitingAcks++;
        return MSG_PROCESSED;
      case NetEvent.EVENT_ACK:
View Full Code Here

TOP

Related Classes of jmt.engine.QueueNet.NetNode

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.