Class FakeDelayManager
- java.lang.Object
-
- app.coronawarn.server.services.submission.controller.FakeDelayManager
-
@Component public class FakeDelayManager extends Object
FakeDelayManagerinstances manage the response delay in the processing of fake (or "dummy") requests.
-
-
Constructor Summary
Constructors Constructor Description FakeDelayManager(SubmissionServiceConfig submissionServiceConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DoublegetFakeDelayInSeconds()Returns the current fake delay in seconds.longgetJitteredFakeDelay()Returns the current fake delay after applying random jitter.voidupdateFakeRequestDelay(long realRequestDuration)Updates the moving average for the request duration with the specified value.
-
-
-
Constructor Detail
-
FakeDelayManager
public FakeDelayManager(SubmissionServiceConfig submissionServiceConfig)
-
-
Method Detail
-
getJitteredFakeDelay
public long getJitteredFakeDelay()
Returns the current fake delay after applying random jitter.
-
updateFakeRequestDelay
public void updateFakeRequestDelay(long realRequestDuration)
Updates the moving average for the request duration with the specified value.
-
getFakeDelayInSeconds
public Double getFakeDelayInSeconds()
Returns the current fake delay in seconds. Used for monitoring.
-
-