Class PollingServer
java.lang.Object
QueueNet.NodeSection
NodeSections.PipeSection
NodeSections.ServiceSection
NodeSections.PollingServer
- Direct Known Subclasses:
ExhaustivePollingServer, GatedPollingServer, LimitedPollingServer
This class implements a polling server.
Every class has a specific distribution and a own set of statistical
parameters.
Every class has walk over (switchover) period
- Author:
- Ahmed Salem
-
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
ConstructorsConstructorDescriptionPollingServer(Integer numberOfServers, Integer[] numberOfVisitsPerClass, ServiceStrategy[] serviceStrategies, ServiceStrategy[] switchOverStrategies) PollingServer(Integer numberOfServers, Integer[] numberOfVisits, ServiceStrategy[] serviceStrategies, ServiceStrategy[] switchOverStrategies, Integer[] serverNumRequired, String[] serverNames, Integer[] serversPerServerType, Object[] serverCompatibilities, String schedulingPolicy) Creates a new instance of PollingServer. -
Method Summary
Modifier and TypeMethodDescriptiondoublegetDoubleSectionProperty(int id) Gets a double type property of this node.doublegetDoubleSectionProperty(int id, JobClass jobClass) Gets a double type property of this node depending on a specified job class.Gets the service strategy for each class.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 should be overridden to implement a specific NetMessage processor.Methods inherited from class ServiceSection
sendBackward, sendBackward, sendForward, sendForwardMethods inherited from class NodeSection
analyze, analyze, analyzeFCR, analyzeFJ, analyzeJoin, analyzeTransition, getClassCompatibilities, 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
-
PollingServer
public PollingServer(Integer numberOfServers, Integer[] numberOfVisitsPerClass, ServiceStrategy[] serviceStrategies, ServiceStrategy[] switchOverStrategies) -
PollingServer
public PollingServer(Integer numberOfServers, Integer[] numberOfVisits, ServiceStrategy[] serviceStrategies, ServiceStrategy[] switchOverStrategies, Integer[] serverNumRequired, String[] serverNames, Integer[] serversPerServerType, Object[] serverCompatibilities, String schedulingPolicy) Creates a new instance of PollingServer.- Parameters:
numberOfServers- Number of jobs which can be served simultaneously.numberOfVisits- Number of job visits per class (not used).serviceStrategies- Array of service strategies, one per class.switchOverStrategies- Array of switchover strategies, one per class
-
-
Method Details
-
getDoubleSectionProperty
Description copied from class:NodeSectionGets a double type property of this node. Note that the first 256 identifiers are reserved by NodeSection class.- Overrides:
getDoubleSectionPropertyin classNodeSection- Parameters:
id- Property identifier (see properties constants).- Returns:
- Property value.
- Throws:
NetException- if the requested property is not available.
-
getDoubleSectionProperty
Description copied from class:NodeSectionGets a double type property of this node depending on a specified job class. Note that the first 256 identifiers are reserved by NodeSection class.- Overrides:
getDoubleSectionPropertyin classNodeSection- Parameters:
id- Property identifier (see properties constants).jobClass- jobClass.- Returns:
- Property value.
- Throws:
NetException- if the requested property is not available.
-
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
Description copied from class:NodeSectionThis method should be overridden to implement a specific NetMessage processor.- Specified by:
processin classNodeSection- Parameters:
message- message to be processed.- Returns:
- message processing result.
- Throws:
NetException
-
getServiceStrategies
Gets the service strategy for each class.- Returns:
- the service strategy for each class.
-