Class FederationBatchProcessor
- java.lang.Object
-
- app.coronawarn.server.services.download.FederationBatchProcessor
-
@Component public class FederationBatchProcessor extends Object
Responsible for downloading and storing batch information from the federation gateway.
-
-
Constructor Summary
Constructors Constructor Description FederationBatchProcessor(FederationBatchInfoService batchInfoService, DiagnosisKeyService diagnosisKeyService, FederationGatewayDownloadService federationGatewayDownloadService, DownloadServiceConfig config, ValidFederationKeyFilter federationKeyValidator)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
processErrorFederationBatches()
Downloads and processes all batches from the federation gateway that have previously been marked with the status valueFederationBatchStatus.ERROR
.void
processUnprocessedFederationBatches()
Downloads and processes all batches from the federation gateway that have previously been marked with status valueFederationBatchStatus.UNPROCESSED
.void
saveFirstBatchInfoForDate(LocalDate date)
Stores the batch info for the specified date.
-
-
-
Constructor Detail
-
FederationBatchProcessor
public FederationBatchProcessor(FederationBatchInfoService batchInfoService, DiagnosisKeyService diagnosisKeyService, FederationGatewayDownloadService federationGatewayDownloadService, DownloadServiceConfig config, ValidFederationKeyFilter federationKeyValidator)
Constructor.- Parameters:
batchInfoService
- AFederationBatchInfoService
for accessing diagnosis key batch information.diagnosisKeyService
- ADiagnosisKeyService
for storing retrieved diagnosis keys.federationGatewayDownloadService
- AFederationGatewayDownloadService
for retrieving federation diagnosis key batches.config
- ADownloadServiceConfig
for retrieving federation configuration.federationKeyValidator
- AValidFederationKeyFilter
for validating keys in the downloaded batches
-
-
Method Detail
-
saveFirstBatchInfoForDate
public void saveFirstBatchInfoForDate(LocalDate date)
Stores the batch info for the specified date. Its status is set toFederationBatchStatus.UNPROCESSED
.- Parameters:
date
- The date for which the first batch info is stored.
-
processErrorFederationBatches
public void processErrorFederationBatches()
Downloads and processes all batches from the federation gateway that have previously been marked with the status valueFederationBatchStatus.ERROR
.
-
processUnprocessedFederationBatches
public void processUnprocessedFederationBatches()
Downloads and processes all batches from the federation gateway that have previously been marked with status valueFederationBatchStatus.UNPROCESSED
.
-
-