public class DefaultBackupFileStore extends Object implements BackupFileStore
BackupFileStore.| Constructor and Description |
|---|
DefaultBackupFileStore(com.atlassian.config.HomeLocator homeLocator) |
| 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(com.atlassian.config.HomeLocator homeLocator)
public void cleanUpAutomatedBackupFiles()
BackupFileStorecleanUpAutomatedBackupFiles in interface BackupFileStorepublic File getBackupDirectory()
BackupFileStoregetBackupDirectory in interface BackupFileStorepublic List<File> getBackupFiles()
BackupFileStoregetBackupFiles in interface BackupFileStoreFilepublic Date extractTimestamp(File file)
BackupFileStoreextractTimestamp in interface BackupFileStorefile - 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 © 2016 Atlassian. All rights reserved.