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
Operation
s can also be delayed.- Author:
- Lion Wagner
-
Field Summary
Fields inherited from class cambio.simulator.events.ExperimentAction
initialArrivalTime
Fields inherited from class desmoj.core.simulator.EventAbstract
numberOfEntities
Fields 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, setTargetTime
Methods inherited from class cambio.simulator.events.ExperimentAction
getInitialArrivalTime
Methods inherited from class cambio.simulator.entities.NamedExternalEvent
eventRoutine, getPlainName, getQuotedName, getQuotedPlainName, rename
Methods inherited from class desmoj.core.simulator.ExternalEvent
clone, schedule, schedule, schedule, schedule, scheduleAfter, scheduleBefore, schedulePreempt
Methods inherited from class desmoj.core.simulator.EventAbstract
generateTraceForScheduling, getNumberOfEntities, getRealTimeConstraint, getSchedulingPriority, isExternal, setRealTimeConstraint, setSchedulingPriority
Methods inherited from class desmoj.core.simulator.Schedulable
assignReporter, cancel, getCorrespondingReportable, isCurrent, isScheduled, reSchedule, reSchedule, reSchedulePreempt, scheduledNext, setCorrespondingReportable
Methods 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, traceOn
Methods 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
- targetMicroservice
operationSrc
-Operation
of the microservice that should be affected, can be set tonull
to affect allOperation
soperationTrg
- targetOperation
of the operationSrc that should be affected, can be set tonull
to affect all outgoingInternalRequest
s
-
-
Method Details
-
setDuration
public void setDuration(double duration) -
onRoutineExecution
public void onRoutineExecution()- Specified by:
onRoutineExecution
in classNamedExternalEvent
-