Class PSServer
java.lang.Object
QueueNet.NodeSection
NodeSections.PipeSection
NodeSections.ServiceSection
NodeSections.Server
NodeSections.PSServer
Name: PSServer
Description: This class implements a multi-class processor sharing server.
Date: 04/ott/2009 Time: 13.45.37
- Version:
- 1.0
- Author:
- Bertoli Marco
-
Nested Class Summary
Nested classes/interfaces inherited from class Server
Server.BusyServer, Server.ServerType -
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
ConstructorsConstructorDescriptionPSServer(Integer numberOfServers, Integer[] numberOfVisits, ServiceStrategy[] serviceStrategies) PSServer(Integer numberOfServers, Integer[] numberOfVisits, ServiceStrategy[] serviceStrategies, Boolean priorityUsed, PSStrategy[] psStrategies, Double[] serviceWeights) PSServer(Integer numberOfServers, Integer[] numberOfVisits, ServiceStrategy[] serviceStrategies, PSStrategy[] psStrategies, Double[] serviceWeights) PSServer(Integer numberOfServers, Integer maxRunningJobs, Integer[] numberOfVisits, ServiceStrategy[] serviceStrategies, Boolean priorityUsed, PSStrategy[] psStrategies, Double[] serviceWeights, Integer[] serverNumRequired, String[] serverNames, Integer[] serversPerServerType, Object[] serverCompatibilities, String schedulingPolicy) Creates a new instance of PSServer.PSServer(Integer numberOfServers, Integer maxRunningJobs, Integer[] numberOfVisits, ServiceStrategy[] serviceStrategies, Boolean priorityUsed, PSStrategy[] psStrategies, Double[] serviceWeights, Map<String, Object> advancedFeatures) -
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.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.voidsetQuantumSize(double quantumSize) voidsetSwitchTime(double switchTime) Methods inherited from class Server
findNextJobToProcessFCFS, findNextJobToProcessLCFS, getClassCompatibilities, getLastJobInfo, getNumOfFreeServersForClass, getServerRequired, getServerTypes, getServiceStrategies, getServiceStrategiesPerServerType, hasFreeServers, isInVacationMethods inherited from class ServiceSection
sendBackward, sendBackward, sendForward, sendForwardMethods inherited from class NodeSection
analyze, analyze, analyzeFCR, analyzeFJ, analyzeJoin, analyzeTransition, getIntSectionProperty, getIntSectionProperty, getJobClasses, getJobInfoList, getObject, getObject, getOwnerNode, getParameter, getParameter, getSectionID, isEnabled, isEnabled, isMine, isMyOwnerNode, redirect, removeMessage, send, send, send, send, send, send, sendAckAfterDrop, sendMe, sendMe, updateVisitPath
-
Constructor Details
-
PSServer
public PSServer(Integer numberOfServers, Integer[] numberOfVisits, ServiceStrategy[] serviceStrategies) throws NetException - Throws:
NetException
-
PSServer
public PSServer(Integer numberOfServers, Integer[] numberOfVisits, ServiceStrategy[] serviceStrategies, PSStrategy[] psStrategies, Double[] serviceWeights) throws NetException - Throws:
NetException
-
PSServer
public PSServer(Integer numberOfServers, Integer[] numberOfVisits, ServiceStrategy[] serviceStrategies, Boolean priorityUsed, PSStrategy[] psStrategies, Double[] serviceWeights) throws NetException - Throws:
NetException
-
PSServer
public PSServer(Integer numberOfServers, Integer maxRunningJobs, Integer[] numberOfVisits, ServiceStrategy[] serviceStrategies, Boolean priorityUsed, PSStrategy[] psStrategies, Double[] serviceWeights, Integer[] serverNumRequired, String[] serverNames, Integer[] serversPerServerType, Object[] serverCompatibilities, String schedulingPolicy) throws NetException Creates a new instance of PSServer.- Parameters:
numberOfServers- Number of servers which can be shared among jobs.maxRunningJobs- 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.psStrategies- Array of PS strategies, one per class.serviceWeights- Array of service weights, one per class.- Throws:
NetException
-
PSServer
public PSServer(Integer numberOfServers, Integer maxRunningJobs, Integer[] numberOfVisits, ServiceStrategy[] serviceStrategies, Boolean priorityUsed, PSStrategy[] psStrategies, Double[] serviceWeights, Map<String, Object> advancedFeatures) throws NetException- Throws:
NetException
-
-
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 classServer- 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 classServer- 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 classServer- Parameters:
node- Owner node.- Throws:
NetException
-
process
Description copied from class:NodeSectionThis method should be overridden to implement a specific NetMessage processor.- Overrides:
processin classServer- Parameters:
message- message to be processed.- Returns:
- message processing result.
- Throws:
NetException
-
setQuantumSize
public void setQuantumSize(double quantumSize) -
setSwitchTime
public void setSwitchTime(double switchTime)
-