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, groupedDiagnosisKeys, minNumberOfKeysPerBundle, ONE_HOUR_INTERVAL_SECONDS, supportedCountries, TEN_MINUTES_INTERVAL_SECONDS
-
-
Constructor Summary
Constructors Constructor Description ProdDiagnosisKeyBundler(DistributionServiceConfig distributionServiceConfig, KeySharingPoliciesChecker sharingPoliciesChecker)
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 based on the country and 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, getDistributionTime, getHoursWithDistributableDiagnosisKeys, getSubmissionDateTime, mapDiagnosisKeysPerVisitedCountries, numberOfKeysForDateBelowMaximum, populateEuPackageWithDistributableDiagnosisKeys, setDiagnosisKeys
-
-
-
-
Constructor Detail
-
ProdDiagnosisKeyBundler
public ProdDiagnosisKeyBundler(DistributionServiceConfig distributionServiceConfig, KeySharingPoliciesChecker sharingPoliciesChecker)
Creates a newProdDiagnosisKeyBundler
.
-
-
Method Detail
-
createDiagnosisKeyDistributionMap
protected void createDiagnosisKeyDistributionMap(Collection<DiagnosisKey> diagnosisKeys)
Initializes the internaldistributableDiagnosisKeys
map, grouping the diagnosis keys based on the country and by the date on which they may be distributed, while respecting the expiry and shifting policies.- Specified by:
createDiagnosisKeyDistributionMap
in classDiagnosisKeyBundler
-
-