Class FakeDelayManager
- java.lang.Object
-
- app.coronawarn.server.services.submission.controller.FakeDelayManager
-
@Component public class FakeDelayManager extends Object
FakeDelayManager
instances 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 Double
getFakeDelayInSeconds()
Returns the current fake delay in seconds.long
getJitteredFakeDelay()
Returns the current fake delay after applying random jitter.void
updateFakeRequestDelay(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.
-
-