Klasse DatabaseBackupService
java.lang.Object
de.delinkedde.areashopreborn.application.DatabaseBackupService
Creates and verifies consistent SQLite backups inside plugin-owned storage.
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungDatabaseBackupService(Database database, EstateRepository estates, Path pluginDataFolder, String directoryName, int retentionCount) Creates a backup service.DatabaseBackupService(Database database, EstateRepository estates, Path pluginDataFolder, String directoryName, int retentionCount, long maximumBackupBytes, long maximumManifestBytes, int maximumDirectoryEntries) Creates a production backup service with explicit resource limits.DatabaseBackupService(Database database, EstateRepository estates, Path storageRoot, Clock clock, int retentionCount) Creates a testable backup service with an explicit clock and normalized storage root.DatabaseBackupService(Database database, EstateRepository estates, Path storageRoot, Clock clock, int retentionCount, long maximumBackupBytes, long maximumManifestBytes, int maximumDirectoryEntries) Creates a testable bounded backup service. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungCreates a consistent database snapshot, integrity manifest, and audit entry.Verifies manifest metadata, SHA-256, size, SQLite integrity, and schema version.
-
Konstruktordetails
-
DatabaseBackupService
public DatabaseBackupService(Database database, EstateRepository estates, Path pluginDataFolder, String directoryName, int retentionCount) Creates a backup service.- Parameter:
database- SQLite owner and executorestates- audit repositorypluginDataFolder- plugin-owned data directorydirectoryName- backup directory relative to the plugin data directoryretentionCount- number of newest complete backups to retain
-
DatabaseBackupService
public DatabaseBackupService(Database database, EstateRepository estates, Path pluginDataFolder, String directoryName, int retentionCount, long maximumBackupBytes, long maximumManifestBytes, int maximumDirectoryEntries) Creates a production backup service with explicit resource limits.- Parameter:
database- SQLite owner and executorestates- audit repositorypluginDataFolder- plugin-owned data directorydirectoryName- backup directory relative to the plugin data directoryretentionCount- number of newest complete backups to retainmaximumBackupBytes- maximum permitted snapshot sizemaximumManifestBytes- maximum permitted manifest sizemaximumDirectoryEntries- maximum entries scanned during retention
-
DatabaseBackupService
public DatabaseBackupService(Database database, EstateRepository estates, Path storageRoot, Clock clock, int retentionCount) Creates a testable backup service with an explicit clock and normalized storage root.- Parameter:
database- SQLite owner and executorestates- audit repositorystorageRoot- normalized backup directoryclock- timestamp sourceretentionCount- number of newest complete backups to retain
-
DatabaseBackupService
public DatabaseBackupService(Database database, EstateRepository estates, Path storageRoot, Clock clock, int retentionCount, long maximumBackupBytes, long maximumManifestBytes, int maximumDirectoryEntries) Creates a testable bounded backup service.- Parameter:
database- SQLite owner and executorestates- audit repositorystorageRoot- normalized backup directoryclock- timestamp sourceretentionCount- number of newest complete backups to retainmaximumBackupBytes- maximum permitted snapshot sizemaximumManifestBytes- maximum permitted manifest sizemaximumDirectoryEntries- maximum entries scanned during retention
-
-
Methodendetails
-
create
Creates a consistent database snapshot, integrity manifest, and audit entry.- Parameter:
administratorId- administrator requesting the backup- Gibt zurück:
- future containing the verified artifact metadata
-
verify
Verifies manifest metadata, SHA-256, size, SQLite integrity, and schema version.- Parameter:
databaseFile- exact backup file name returned bycreate(UUID)- Gibt zurück:
- future containing verified metadata
-