public class DefaultBackupFileStore extends Object implements BackupFileStore
BackupFileStore
.Constructor and Description |
---|
DefaultBackupFileStore(HomeDirectoryService homeDirectoryService) |
Modifier and Type | Method and Description |
---|---|
void |
cleanUpAutomatedBackupFiles()
If there are more than the maximum number of automated backup files, delete the oldest ones
|
protected void |
deleteFile(File file) |
Date |
extractTimestamp(File file)
Extract the timestamp from the name of the given backup file.
|
protected Iterable<File> |
filesInBackupDirectory() |
File |
getBackupDirectory()
Returns the directory where backup files are stored
|
List<File> |
getBackupFiles()
Return a list of automated backup files, sorted by ascending date.
|
protected com.google.common.base.Predicate<File> |
isAutomatedBackup() |
protected com.google.common.base.Function<File,Date> |
toTimeStamp() |
public DefaultBackupFileStore(HomeDirectoryService homeDirectoryService)
public void cleanUpAutomatedBackupFiles()
BackupFileStore
cleanUpAutomatedBackupFiles
in interface BackupFileStore
public File getBackupDirectory()
BackupFileStore
getBackupDirectory
in interface BackupFileStore
public List<File> getBackupFiles()
BackupFileStore
getBackupFiles
in interface BackupFileStore
File
public Date extractTimestamp(File file)
BackupFileStore
extractTimestamp
in interface BackupFileStore
file
- an automated backup fileDate
, or null
if the file is not a valid backup fileprotected com.google.common.base.Predicate<File> isAutomatedBackup()
protected void deleteFile(File file)
Copyright © 2021 Atlassian. All rights reserved.