Package cern.nxcals.api.ingestion.retry
Interface BackupStrategy<T>
- Type Parameters:
T- - the type of the messages supported by the strategy
public interface BackupStrategy<T>
Backup Strategy for the rejected messages. It takes care of storing messages outside of the publisher jvm as
well as restoring them for further processing once the underlying problems are solved. All the backup specific
details such external storage location etc. should be left to the implementation.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionBackups the given messagevoidmarkAsRestored(BackupStrategy.DataPartition<T> partition) Marks a given partition as restored i.e.restore()Restores data from the backup
-
Method Details
-
backup
Backups the given message- Parameters:
message- - to be stored in the backup- Returns:
-
restore
List<BackupStrategy.DataPartition<T>> restore()Restores data from the backup- Returns:
- list of restored data partitions
-
markAsRestored
Marks a given partition as restored i.e. successfully send to NXCALS- Parameters:
partition- - restored partition
-