Class BackupChainImpl
- java.lang.Object
-
- org.exoplatform.services.jcr.ext.backup.impl.BackupChainImpl
-
- All Implemented Interfaces:
BackupChain,RepositoryBackupChain
public class BackupChainImpl extends Object implements BackupChain
Created by The eXo Platform SARL .- Version:
- $Id: $
- Author:
- Gennady Azarenkov
-
-
Field Summary
-
Fields inherited from interface org.exoplatform.services.jcr.ext.backup.BackupChain
FULL_WORKING, INCREMENTAL_WORKING, TIMEOUT
-
Fields inherited from interface org.exoplatform.services.jcr.ext.backup.RepositoryBackupChain
FINISHED, FULL_BACKUP_FINISHED_INCREMENTAL_BACKUP_WORKING, INITIALIZED, WORKING
-
-
Constructor Summary
Constructors Constructor Description BackupChainImpl(BackupConfig config, File logDirectory, org.exoplatform.services.jcr.RepositoryService repositoryService, String fullBackupType, String incrementalBackupType, String backupId, File rootDir, Calendar startTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(BackupJobListener listener)Add listener to all existing and will be created in future jobs.BackupConfiggetBackupConfig()Getting backup config.StringgetBackupId()Getting identifier of backup.List<BackupJob>getBackupJobs()Getting current backup jobs.intgetFullBackupState()Getting the state of full backup.intgetIncrementalBackupState()Getting the state of incremental backup.StringgetLogFilePath()Getting path to backup log.CalendargetStartedTime()Getting started time of backup.intgetState()Getting state of backup.booleanisFinished()isFinished.voidremoveListener(BackupJobListener listener)Remove listener from all existing and don't add it to a created in future jobs.voidrestartIncrementalBackup()voidstartBackup()Call start backup.voidstopBackup()Call stop backup.
-
-
-
Constructor Detail
-
BackupChainImpl
public BackupChainImpl(BackupConfig config, File logDirectory, org.exoplatform.services.jcr.RepositoryService repositoryService, String fullBackupType, String incrementalBackupType, String backupId, File rootDir, Calendar startTime) throws BackupOperationException, BackupConfigurationException
-
-
Method Detail
-
addListener
public void addListener(BackupJobListener listener)
Description copied from interface:BackupChainAdd listener to all existing and will be created in future jobs.- Specified by:
addListenerin interfaceBackupChain- Parameters:
listener- BackupJobListener, the backup job listener
-
removeListener
public void removeListener(BackupJobListener listener)
Description copied from interface:BackupChainRemove listener from all existing and don't add it to a created in future jobs.- Specified by:
removeListenerin interfaceBackupChain- Parameters:
listener- BackupJobListener, the backup job listener
-
getBackupJobs
public List<BackupJob> getBackupJobs()
Description copied from interface:BackupChainGetting current backup jobs.- Specified by:
getBackupJobsin interfaceBackupChain- Returns:
- List return list of current backup jobs.
-
startBackup
public final void startBackup()
Description copied from interface:RepositoryBackupChainCall start backup.- Specified by:
startBackupin interfaceRepositoryBackupChain
-
stopBackup
public final void stopBackup()
Description copied from interface:RepositoryBackupChainCall stop backup.- Specified by:
stopBackupin interfaceRepositoryBackupChain
-
restartIncrementalBackup
public void restartIncrementalBackup()
-
getBackupConfig
public BackupConfig getBackupConfig()
Description copied from interface:BackupChainGetting backup config.- Specified by:
getBackupConfigin interfaceBackupChain- Specified by:
getBackupConfigin interfaceRepositoryBackupChain- Returns:
- BackupConfig return the backup config
-
getFullBackupState
public int getFullBackupState()
Description copied from interface:BackupChainGetting the state of full backup.- Specified by:
getFullBackupStatein interfaceBackupChain- Returns:
- int return state of full backup
-
getIncrementalBackupState
public int getIncrementalBackupState()
Description copied from interface:BackupChainGetting the state of incremental backup.- Specified by:
getIncrementalBackupStatein interfaceBackupChain- Returns:
- int return state of full backup
-
getLogFilePath
public String getLogFilePath()
Description copied from interface:RepositoryBackupChainGetting path to backup log.- Specified by:
getLogFilePathin interfaceRepositoryBackupChain- Returns:
- String return path to backup log
-
getState
public int getState()
Description copied from interface:RepositoryBackupChainGetting state of backup.- Specified by:
getStatein interfaceRepositoryBackupChain- Returns:
- int return state of backup
-
isFinished
public boolean isFinished()
Description copied from interface:RepositoryBackupChainisFinished.- Specified by:
isFinishedin interfaceRepositoryBackupChain- Returns:
- boolean return 'true' if backup was finished.
-
getBackupId
public String getBackupId()
Description copied from interface:RepositoryBackupChainGetting identifier of backup.- Specified by:
getBackupIdin interfaceRepositoryBackupChain- Returns:
- String return identifier of backup
-
getStartedTime
public Calendar getStartedTime()
Description copied from interface:RepositoryBackupChainGetting started time of backup.- Specified by:
getStartedTimein interfaceRepositoryBackupChain- Returns:
- Calendar return started time of backup
-
-