Package cambio.simulator.events
Class DelayInjection
java.lang.Object
desmoj.core.simulator.NamedObject
desmoj.core.simulator.ModelComponent
desmoj.core.simulator.Schedulable
desmoj.core.simulator.EventAbstract
desmoj.core.simulator.ExternalEvent
cambio.simulator.entities.NamedExternalEvent
cambio.simulator.events.ExperimentAction
cambio.simulator.events.SelfScheduledExperimentAction
cambio.simulator.events.DelayInjection
- All Implemented Interfaces:
ISelfScheduled
Event that triggers a latency injection. The injection can be applied on different levels:
Either all outgoing requests of a
Or all outgoing dependency requests of a single
Or the connection between two specific
Either all outgoing requests of a
Microservice are delayed.Or all outgoing dependency requests of a single
Operation
can be delayed.Or the connection between two specific
Operations can also be delayed.- Author:
- Lion Wagner
-
Field Summary
Fields inherited from class cambio.simulator.events.ExperimentAction
initialArrivalTimeFields inherited from class desmoj.core.simulator.EventAbstract
numberOfEntitiesFields inherited from class desmoj.core.simulator.Schedulable
_schedule -
Constructor Summary
ConstructorsConstructorDescriptionDelayInjection(desmoj.core.simulator.Model model, String name, boolean showInTrace) DelayInjection(desmoj.core.simulator.Model model, String name, boolean showInTrace, double delay, double stdDeviation, Microservice microservice, Operation operationSrc, Operation operationTrg) Constructs a newDelayInjection. -
Method Summary
Methods inherited from class cambio.simulator.events.SelfScheduledExperimentAction
doInitialSelfSchedule, setTargetTimeMethods inherited from class cambio.simulator.events.ExperimentAction
getInitialArrivalTimeMethods inherited from class cambio.simulator.entities.NamedExternalEvent
eventRoutine, getPlainName, getQuotedName, getQuotedPlainName, renameMethods inherited from class desmoj.core.simulator.ExternalEvent
clone, schedule, schedule, schedule, schedule, scheduleAfter, scheduleBefore, schedulePreemptMethods inherited from class desmoj.core.simulator.EventAbstract
generateTraceForScheduling, getNumberOfEntities, getRealTimeConstraint, getSchedulingPriority, isExternal, setRealTimeConstraint, setSchedulingPriorityMethods inherited from class desmoj.core.simulator.Schedulable
assignReporter, cancel, getCorrespondingReportable, isCurrent, isScheduled, reSchedule, reSchedule, reSchedulePreempt, scheduledNext, setCorrespondingReportableMethods inherited from class desmoj.core.simulator.ModelComponent
current, currentEntity, currentEntityAll, currentEvent, currentlySendDebugNotes, currentlySendTraceNotes, currentModel, currentSimProcess, debugIsOn, debugOff, debugOn, getModel, isExperimentCompatible, isModelCompatible, presentTime, sendDebugNote, sendMessage, sendTraceNote, sendWarning, skipTraceNote, skipTraceNote, traceIsOn, traceOff, traceOnMethods inherited from class desmoj.core.simulator.NamedObject
getName, toString
-
Constructor Details
-
DelayInjection
-
DelayInjection
public DelayInjection(desmoj.core.simulator.Model model, String name, boolean showInTrace, double delay, double stdDeviation, Microservice microservice, Operation operationSrc, Operation operationTrg) Constructs a newDelayInjection.- Parameters:
delay- mean delay that should be added to a connectionstdDeviation- standard deviation of this delaymicroservice- targetMicroserviceoperationSrc-Operationof the microservice that should be affected, can be set tonullto affect allOperationsoperationTrg- targetOperationof the operationSrc that should be affected, can be set tonullto affect all outgoingInternalRequests
-
-
Method Details
-
setDuration
public void setDuration(double duration) -
onRoutineExecution
public void onRoutineExecution()- Specified by:
onRoutineExecutionin classNamedExternalEvent
-