java.lang.Object
edu.kit.ipd.sdq.pcm.simulation.scheduler.exact.timeslice.impl.QuantumTimeSlice
All Implemented Interfaces:
ITimeSlice, Cloneable

public class QuantumTimeSlice extends Object implements ITimeSlice
  • Field Details

    • remaining_time

      protected double remaining_time
    • timeslice

      protected double timeslice
    • remaining_quanta

      protected int remaining_quanta
    • quanta

      protected int quanta
    • min_quanta

      protected int min_quanta
  • Constructor Details

    • QuantumTimeSlice

      public QuantumTimeSlice(double timeslice, int quanta, int min_quanta)
    • QuantumTimeSlice

      protected QuantumTimeSlice()
  • Method Details

    • isFinished

      public boolean isFinished()
      Description copied from interface: ITimeSlice
      Returns true if the timeslice is finished, false otherwise.
      Specified by:
      isFinished in interface ITimeSlice
    • substractTime

      public void substractTime(double time)
      Description copied from interface: ITimeSlice
      Subtracts the specified amount of time from the timeslice. The remaining timeslice MUST be greater or equal than zero.
      Specified by:
      substractTime in interface ITimeSlice
    • reset

      public void reset()
    • fullReset

      public void fullReset()
      Description copied from interface: ITimeSlice
      Resets the remaining time to a full timeslice.
      Specified by:
      fullReset in interface ITimeSlice
    • getRemainingTime

      public double getRemainingTime()
      Description copied from interface: ITimeSlice
      Returns Time until the timeslice is interrupted.
      Specified by:
      getRemainingTime in interface ITimeSlice
    • punish

      public void punish(int penalty)
      Specified by:
      punish in interface ITimeSlice
    • setExpired

      public void setExpired()
      Specified by:
      setExpired in interface ITimeSlice
    • clone

      public ITimeSlice clone()
      Specified by:
      clone in interface ITimeSlice
      Overrides:
      clone in class Object
    • halfReset

      public void halfReset()
      Specified by:
      halfReset in interface ITimeSlice
    • updateTimeForBoosting

      public void updateTimeForBoosting()
      Specified by:
      updateTimeForBoosting in interface ITimeSlice
    • updateTimeForScheduling

      public void updateTimeForScheduling()
      Specified by:
      updateTimeForScheduling in interface ITimeSlice