Class Fork
java.lang.Object
QueueNet.NodeSection
NodeSections.PipeSection
NodeSections.OutputSection
NodeSections.Fork
Title: Fork
Description: This class is a fork output section, used to split a job on every output link. Split job can be assembled back in a join input section. A maximum number of jobs inside a fork-join section can be specified: when reached this component will block until at least one job is joined.
- Author:
- Bertoli Marco Date: 13-mar-2006 Time: 15.23.22 Modified by J. Shuai & M. Cazzoli, implemented fork strategies
-
Field Summary
Fields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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) Splits input job on every output link and waits if 'block' job number are not joined if and only if block is enabled.Methods inherited from class OutputSection
sendBackward, sendBackwardMethods inherited from class NodeSection
analyze, analyze, analyzeFCR, 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
-
Constructor Details
-
Fork
public Fork()Constructs a new Fork without blocking and with 1 job per link. -
Fork
-
Fork
public Fork(int jobsPerLink, int block) Construct a new Fork node.- Parameters:
jobsPerLink- number of jobs to be routed on each link.block- maximum number of jobs allowed in a fork-join region (-1 or 0 is infinity).
-
Fork
public Fork(Integer jobsPerLink, Integer block, Boolean isSimplifiedFork, ForkStrategy[] forkStrategies)
-
-
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
Splits input job on every output link and waits if 'block' job number are not joined if and only if block is enabled.- Specified by:
processin classNodeSection- Parameters:
message- message to be processed.- Returns:
- message processing result.
- Throws:
NetException- if something goes wrong.
-