Class QuantumTimeSlice
java.lang.Object
edu.kit.ipd.sdq.pcm.simulation.scheduler.exact.timeslice.impl.QuantumTimeSlice
- All Implemented Interfaces:
ITimeSlice,Cloneable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected intprotected intprotected doubleprotected double -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedQuantumTimeSlice(double timeslice, int quanta, int min_quanta) -
Method Summary
Modifier and TypeMethodDescriptionclone()voidResets the remaining time to a full timeslice.doubleReturns Time until the timeslice is interrupted.voidbooleanReturns true if the timeslice is finished, false otherwise.voidpunish(int penalty) voidreset()voidvoidsubstractTime(double time) Subtracts the specified amount of time from the timeslice.voidvoid
-
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:ITimeSliceReturns true if the timeslice is finished, false otherwise.- Specified by:
isFinishedin interfaceITimeSlice
-
substractTime
public void substractTime(double time) Description copied from interface:ITimeSliceSubtracts the specified amount of time from the timeslice. The remaining timeslice MUST be greater or equal than zero.- Specified by:
substractTimein interfaceITimeSlice
-
reset
public void reset() -
fullReset
public void fullReset()Description copied from interface:ITimeSliceResets the remaining time to a full timeslice.- Specified by:
fullResetin interfaceITimeSlice
-
getRemainingTime
public double getRemainingTime()Description copied from interface:ITimeSliceReturns Time until the timeslice is interrupted.- Specified by:
getRemainingTimein interfaceITimeSlice
-
punish
public void punish(int penalty) - Specified by:
punishin interfaceITimeSlice
-
setExpired
public void setExpired()- Specified by:
setExpiredin interfaceITimeSlice
-
clone
- Specified by:
clonein interfaceITimeSlice- Overrides:
clonein classObject
-
halfReset
public void halfReset()- Specified by:
halfResetin interfaceITimeSlice
-
updateTimeForBoosting
public void updateTimeForBoosting()- Specified by:
updateTimeForBoostingin interfaceITimeSlice
-
updateTimeForScheduling
public void updateTimeForScheduling()- Specified by:
updateTimeForSchedulingin interfaceITimeSlice
-