Class PollingServer

All Implemented Interfaces:
Serializable, Copyable

public class PollingServer extends ServiceSection implements Serializable
A service section that processes jobs using Polling scheduling
See Also:
  • Constructor Details

    • PollingServer

      public PollingServer(List<JobClass> jobClasses)
      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

      public void setPollingType(PollingType pollingType)
      Sets the polling type for this polling server.
      Parameters:
      pollingType - the polling type (GATED, EXHAUSTIVE, or KLIMITED)
    • setPollingType

      public 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)
    • getPollingType

      public PollingType 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

      public 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

      public Distribution getSwitchover(JobClass jobClass)
      Gets the switchover time for a job class.
      Parameters:
      jobClass - the job class
      Returns:
      the switchover time distribution