Package jline.lang.sections
Class PollingServer
-
- All Implemented Interfaces:
-
java.io.Serializable,jline.lang.Copyable
public class PollingServer extends ServiceSection implements Serializable
A service section that processes jobs using Polling scheduling
-
-
Field Summary
Fields Modifier and Type Field Description public PollingTypepollingTypepublic intpollingKprotected doublenumberOfServersprotected Map<JobClass, ServiceBinding>serviceProcessespublic StringclassNameprotected Stringname
-
Constructor Summary
Constructors Constructor Description PollingServer(List<JobClass> jobClasses)Creates a new polling server for the specified job classes.
-
Method Summary
Modifier and Type Method Description PollingTypegetPollingType()Gets the current polling type. voidsetPollingType(PollingType pollingType)Sets the polling type for this polling server. intgetPollingK()Gets the K value for K-LIMITED polling. voidsetPollingK(int k)Sets the K value for K-LIMITED polling. 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. DistributiongetSwitchover(JobClass jobClass)Gets the switchover time for a job class. -
Methods inherited from class jline.lang.sections.Section
getClassName -
Methods inherited from class jline.lang.sections.ServiceSection
containsJobClass, getServiceDistribution, getServiceProcess, removeServiceProcess, setServiceProcesses -
Methods inherited from class jline.lang.Element
getName, setName -
Methods inherited from class jline.lang.Copyable
copy -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getPollingType
PollingType getPollingType()
Gets the current polling type.
- Returns:
the polling type
-
setPollingType
void setPollingType(PollingType pollingType)
Sets the polling type for this polling server.
- Parameters:
pollingType- the polling type (GATED, EXHAUSTIVE, or KLIMITED)
-
getPollingK
int getPollingK()
Gets the K value for K-LIMITED polling.
- Returns:
the K value
-
setPollingK
void setPollingK(int k)
Sets the K value for K-LIMITED polling.
- Parameters:
k- the K value (must be greater than 0)
-
setPollingType
void setPollingType(PollingType pollingType, int k)
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)
-
setSwitchover
void setSwitchover(JobClass jobClass, Distribution switchoverTime)
Sets the switchover time for a job class.
- Parameters:
jobClass- the job classswitchoverTime- the switchover time distribution
-
getSwitchover
Distribution getSwitchover(JobClass jobClass)
Gets the switchover time for a job class.
- Parameters:
jobClass- the job class- Returns:
the switchover time distribution
-
-
-
-