Class BlockingQueue
java.lang.Object
QueueNet.NodeSection
NodeSections.PipeSection
NodeSections.InputSection
NodeSections.BlockingQueue
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 Summary
FieldsModifier and TypeFieldDescriptionprotected boolean[]For each class, true if jobs in excess must be droppedprotected double[]For each class, true if jobs in excess must be droppedFields inherited from class NodeSection
EXCEPTION_MEASURE_DOES_NOT_EXIST, EXCEPTION_PROPERTY_NOT_AVAILABLE, INPUT, jobsList, logger, MSG_NOT_PROCESSED, MSG_PROCESSED, NO_ADDRESS, OUTPUT, PROPERTY_ID_ARRIVING_JOBS, PROPERTY_ID_AVERAGE_UTILIZATION, PROPERTY_ID_DEPARTING_JOBS, PROPERTY_ID_RESIDENCE_TIME, PROPERTY_ID_RESIDENT_JOBS, PROPERTY_ID_UTILIZATION, SERVICE -
Constructor Summary
ConstructorsConstructorDescriptionBlockingQueue(BlockingRegion myRegion) Creates a new instance of infinite BlockingQueue. -
Method Summary
Modifier and TypeMethodDescriptionvoidanalyzeFCR(int name, Measure measurement) protected voidnodeLinked(NetNode node) 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.protected intprocess(NetMessage message) This method implements a blocking queue.Methods inherited from class InputSection
sendForward, sendForwardMethods inherited from class NodeSection
analyze, analyze, analyzeFJ, analyzeJoin, analyzeTransition, getClassCompatibilities, getDoubleSectionProperty, getDoubleSectionProperty, getIntSectionProperty, getIntSectionProperty, getJobClasses, getJobInfoList, getObject, getObject, getOwnerNode, getParameter, getParameter, getSectionID, getServerTypes, isEnabled, isEnabled, isMine, isMyOwnerNode, redirect, removeMessage, send, send, send, send, send, send, sendAckAfterDrop, sendMe, sendMe, updateVisitPath
-
Field Details
-
classDrop
protected boolean[] classDropFor each class, true if jobs in excess must be dropped -
classWeights
protected double[] classWeightsFor each class, true if jobs in excess must be dropped
-
-
Constructor Details
-
BlockingQueue
Creates a new instance of infinite BlockingQueue.
-
-
Method Details
-
nodeLinked
Description copied from class:NodeSectionThis 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:
nodeLinkedin classNodeSection- Parameters:
node- Owner node.- Throws:
NetException
-
process
This method implements a blocking queue.- Specified by:
processin classNodeSection- Parameters:
message- message to be processed.- Returns:
- the resulting int
- Throws:
NetException
-
analyzeFCR
- Overrides:
analyzeFCRin classNodeSection- Throws:
NetException
-