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

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      PollingServer(List<JobClass> jobClasses) Creates a new polling server for the specified job classes.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      PollingType getPollingType() Gets the current polling type.
      void setPollingType(PollingType pollingType) Sets the polling type for this polling server.
      int getPollingK() Gets the K value for K-LIMITED polling.
      void setPollingK(int k) Sets the K value for K-LIMITED polling.
      void setPollingType(PollingType pollingType, int k) Sets the polling type for this polling server with K value for K-LIMITED.
      void setSwitchover(JobClass jobClass, Distribution switchoverTime) Sets the switchover time for a job class.
      Distribution getSwitchover(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
    • Constructor Detail

      • PollingServer

        PollingServer(List<JobClass> jobClasses)
        Creates a new polling server for the specified job classes.
        Parameters:
        jobClasses - the list of job classes this server will handle
    • Method Detail

      • 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 class
        switchoverTime - 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