Class ConnectionLimitViolationDetectionService
The check interval can be configured with aiida.connection-limit.violation-detection.interval-ms (default: 10 seconds).
Detection can be disabled with aiida.connection-limit.violation-detection.enabled=false.
A violation only ends once the measured power stayed within the limits for the recovery hold
(aiida.connection-limit.violation-detection.recovery-hold-ms, default: 1 minute),
so that a value oscillating around a limit is a single violation and does not flood the user with notifications.
The violation ends at the first record that was back within the limits.
Only accepted permissions are monitored, the violations of other permissions end.
A record without an effective limit counts as within the limits, as no limits means no violation.
The hold is measured in record timestamps, so a violation stays open until a record confirms the recovery.
-
Constructor Summary
ConstructorsConstructorDescriptionConnectionLimitViolationDetectionService(AiidaRecordRepository aiidaRecordRepository, ConnectionLimitViolationRepository connectionLimitViolationRepository, PermissionRepository permissionRepository, ConnectionLimitService connectionLimitService, ConnectionLimitNotificationService connectionLimitNotificationService, Clock clock, long recoveryHoldMs) -
Method Summary
-
Constructor Details
-
ConnectionLimitViolationDetectionService
public ConnectionLimitViolationDetectionService(AiidaRecordRepository aiidaRecordRepository, ConnectionLimitViolationRepository connectionLimitViolationRepository, PermissionRepository permissionRepository, ConnectionLimitService connectionLimitService, ConnectionLimitNotificationService connectionLimitNotificationService, Clock clock, @Value("${aiida.connection-limit.violation-detection.recovery-hold-ms:60000}") long recoveryHoldMs)
-