Package jline.lang.sections
Class PollingServer
java.lang.Object
jline.lang.Element
jline.lang.NetworkElement
jline.lang.sections.Section
jline.lang.sections.ServiceSection
jline.lang.sections.PollingServer
- All Implemented Interfaces:
Serializable,Copyable
A service section that processes jobs using Polling scheduling
- See Also:
-
Field Summary
Fields inherited from class jline.lang.sections.ServiceSection
numberOfServers, serviceProcesses -
Constructor Summary
ConstructorsConstructorDescriptionPollingServer(List<JobClass> jobClasses) Creates a new polling server for the specified job classes. -
Method Summary
Modifier and TypeMethodDescriptionintGets the K value for K-LIMITED polling.Gets the current polling type.getSwitchover(JobClass jobClass) Gets the switchover time for a job class.voidsetPollingK(int k) Sets the K value for K-LIMITED polling.voidsetPollingType(PollingType pollingType) Sets the polling type for this polling server.voidsetPollingType(PollingType pollingType, int k) Sets the polling type for this polling server with K value for K-LIMITED.voidsetSwitchover(JobClass jobClass, Distribution switchoverTime) Sets the switchover time for a job class.Methods inherited from class jline.lang.sections.ServiceSection
containsJobClass, getServiceDistribution, getServiceProcess, removeServiceProcess, setServiceProcessesMethods inherited from class jline.lang.sections.Section
getClassName
-
Constructor Details
-
PollingServer
Creates a new polling server for the specified job classes. Initializes with GATED polling type, K=1 for K-LIMITED mode, and zero switchover times.- Parameters:
jobClasses- the list of job classes this server will handle
-
-
Method Details
-
setPollingType
Sets the polling type for this polling server.- Parameters:
pollingType- the polling type (GATED, EXHAUSTIVE, or KLIMITED)
-
setPollingType
Sets the polling type for this polling server with K value for K-LIMITED.- Parameters:
pollingType- the polling type (GATED, EXHAUSTIVE, or KLIMITED)k- the K value for K-LIMITED polling (ignored for other types)
-
getPollingType
Gets the current polling type.- Returns:
- the polling type
-
getPollingK
public int getPollingK()Gets the K value for K-LIMITED polling.- Returns:
- the K value
-
setPollingK
public void setPollingK(int k) Sets the K value for K-LIMITED polling.- Parameters:
k- the K value (must be greater than 0)
-
setSwitchover
Sets the switchover time for a job class.- Parameters:
jobClass- the job classswitchoverTime- the switchover time distribution
-
getSwitchover
Gets the switchover time for a job class.- Parameters:
jobClass- the job class- Returns:
- the switchover time distribution
-