Class ContinuousTimeSlice
- java.lang.Object
-
- edu.kit.ipd.sdq.pcm.simulation.scheduler.exact.timeslice.impl.ContinuousTimeSlice
-
- All Implemented Interfaces:
ITimeSlice
,Cloneable
- Direct Known Subclasses:
PriorityDependentTimeSlice
public class ContinuousTimeSlice extends Object implements ITimeSlice
-
-
Field Summary
Fields Modifier and Type Field Description protected double
remaining_time
protected double
timeslice
-
Constructor Summary
Constructors Modifier Constructor Description protected
ContinuousTimeSlice()
ContinuousTimeSlice(double timeslice)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ITimeSlice
clone()
void
fullReset()
Resets the remaining time to a full timeslice.double
getRemainingTime()
Returns Time until the timeslice is interrupted.void
halfReset()
boolean
isFinished()
Returns true if the timeslice is finished, false otherwise.void
punish(int penalty)
void
setExpired()
void
substractTime(double time)
Subtracts the specified amount of time from the timeslice.void
updateTimeForBoosting()
void
updateTimeForScheduling()
-
-
-
Method Detail
-
isFinished
public boolean isFinished()
Description copied from interface:ITimeSlice
Returns true if the timeslice is finished, false otherwise.- Specified by:
isFinished
in interfaceITimeSlice
-
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 interfaceITimeSlice
-
fullReset
public void fullReset()
Description copied from interface:ITimeSlice
Resets the remaining time to a full timeslice.- Specified by:
fullReset
in interfaceITimeSlice
-
getRemainingTime
public double getRemainingTime()
Description copied from interface:ITimeSlice
Returns Time until the timeslice is interrupted.- Specified by:
getRemainingTime
in interfaceITimeSlice
-
punish
public void punish(int penalty)
- Specified by:
punish
in interfaceITimeSlice
-
setExpired
public void setExpired()
- Specified by:
setExpired
in interfaceITimeSlice
-
clone
public ITimeSlice clone()
- Specified by:
clone
in interfaceITimeSlice
- Overrides:
clone
in classObject
-
halfReset
public void halfReset()
- Specified by:
halfReset
in interfaceITimeSlice
-
updateTimeForBoosting
public void updateTimeForBoosting()
- Specified by:
updateTimeForBoosting
in interfaceITimeSlice
-
updateTimeForScheduling
public void updateTimeForScheduling()
- Specified by:
updateTimeForScheduling
in interfaceITimeSlice
-
-