Class ProdDiagnosisKeyBundler
- java.lang.Object
-
- app.coronawarn.server.services.distribution.assembly.diagnosiskeys.DiagnosisKeyBundler
-
- app.coronawarn.server.services.distribution.assembly.diagnosiskeys.ProdDiagnosisKeyBundler
-
@Profile("!demo") @Component public class ProdDiagnosisKeyBundler extends DiagnosisKeyBundler
An instance of this class contains a collection ofDiagnosisKeys
, that will be distributed while respecting expiry policy (keys must be expired for a configurable amount of time before distribution) and shifting policy (there must be at least a configurable number of keys in a distribution). The policies are configurable through the propertiesexpiry-policy-minutes
andshifting-policy-threshold
.
-
-
Field Summary
-
Fields inherited from class app.coronawarn.server.services.distribution.assembly.diagnosiskeys.DiagnosisKeyBundler
distributableDiagnosisKeys, distributionTime, expiryPolicyMinutes, minNumberOfKeysPerBundle, ONE_HOUR_INTERVAL_SECONDS, TEN_MINUTES_INTERVAL_SECONDS
-
-
Constructor Summary
Constructors Constructor Description ProdDiagnosisKeyBundler(DistributionServiceConfig distributionServiceConfig)
Creates a newProdDiagnosisKeyBundler
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
createDiagnosisKeyDistributionMap(Collection<DiagnosisKey> diagnosisKeys)
Initializes the internaldistributableDiagnosisKeys
map, grouping the diagnosis keys by the date on which they may be distributed, while respecting the expiry and shifting policies.-
Methods inherited from class app.coronawarn.server.services.distribution.assembly.diagnosiskeys.DiagnosisKeyBundler
getAllDiagnosisKeys, getDatesWithDistributableDiagnosisKeys, getDiagnosisKeysForDate, getDiagnosisKeysForHour, getHoursWithDistributableDiagnosisKeys, getLocalDateTimeFromHoursSinceEpoch, getSubmissionDateTime, numberOfKeysForDateBelowMaximum, setDiagnosisKeys
-
-
-
-
Constructor Detail
-
ProdDiagnosisKeyBundler
public ProdDiagnosisKeyBundler(DistributionServiceConfig distributionServiceConfig)
Creates a newProdDiagnosisKeyBundler
.
-
-
Method Detail
-
createDiagnosisKeyDistributionMap
protected void createDiagnosisKeyDistributionMap(Collection<DiagnosisKey> diagnosisKeys)
Initializes the internaldistributableDiagnosisKeys
map, grouping the diagnosis keys by the date on which they may be distributed, while respecting the expiry and shifting policies.- Specified by:
createDiagnosisKeyDistributionMap
in classDiagnosisKeyBundler
-
-