Class BlockingQueue


public class BlockingQueue extends InputSection
This class implements the queue of a region input station, that is the node which controls the access to a blocking region.
Author:
Stefano Omini Modifief by Bertoli Marco 31-03-2006 (my birthday!!!) Modified by Ashanka (Oct 2009): Desc: FCR(Finite Capacity Region) is a blocking region and it was measuring wrong values for the Performance Indices. This was because the Jobs in FCR were not considering the time spent in the Queueing Stations in the FCR and simply reporting time spent in Queueing in FCR. This behavior is incorrect as Performance Indices for FCR should also contain the time spent in the FCR and not only the time spent queueing. Approach taken presently to rectify is to delay the capture of the performance indices until the job is out of the FCR. So the job dropping are manually handled for Blocking region at Node level.
  • Field Details

    • classDrop

      protected boolean[] classDrop
      For each class, true if jobs in excess must be dropped
    • classWeights

      protected double[] classWeights
      For each class, true if jobs in excess must be dropped
  • Constructor Details

    • BlockingQueue

      public BlockingQueue(BlockingRegion myRegion)
      Creates a new instance of infinite BlockingQueue.
  • Method Details

    • nodeLinked

      protected void nodeLinked(NetNode node) throws NetException
      Description copied from class: NodeSection
      This method should be overridden to implement a specific behaviour of the node section when the node section itself is linked to the owner node. This method should be used to set node section properties depending on the owner node ones.
      Overrides:
      nodeLinked in class NodeSection
      Parameters:
      node - Owner node.
      Throws:
      NetException
    • process

      protected int process(NetMessage message) throws NetException
      This method implements a blocking queue.
      Specified by:
      process in class NodeSection
      Parameters:
      message - message to be processed.
      Returns:
      the resulting int
      Throws:
      NetException
    • analyzeFCR

      public void analyzeFCR(int name, Measure measurement) throws NetException
      Overrides:
      analyzeFCR in class NodeSection
      Throws:
      NetException