Class BackupProcessor
- java.lang.Object
-
- jetbrains.buildServer.serverSide.maintenance.BackupProcessor
-
- All Implemented Interfaces:
Runnable
,BackupProcess
public class BackupProcessor extends Object implements BackupProcess
Performs backup.Notes:
- One instance should be used for only one export (one time).
- In one moment, one backup process only can be executed.
-
-
Constructor Summary
Constructors Constructor Description BackupProcessor(DBFunctionsProvider dbProvider, ServerPaths serverPaths, ZipFactory zipFactory, BackupConfig config, boolean singleUserMode, int mprocId, Logger maintenanceLogger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel()
BackupBriefProcessInfo
getBriefInfo()
Returns brief info of the process.Exception[]
getExceptions()
Returns exceptions that occurred during process performing.File
getFinalFile()
Full backup zip file name.int
getProcessId()
Returns the maintenance process identifier.MaintenanceProcessKind
getProcessKind()
Returns kind of this process.ProgressInfo
getProgressInfo()
Returns the progress in percents and a name of phase.ProgressStatus
getProgressStatus()
BackupReport
getReport()
boolean
hasExceptions()
Determines whether errors occurred during process performing.boolean
isFinished()
Determines that the process already has finished or has been stopped or never will run.void
run()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.serverSide.maintenance.BackupProcess
cancel, getExceptions, getProcessId, getProgressStatus, hasExceptions, isFinished
-
-
-
-
Constructor Detail
-
BackupProcessor
public BackupProcessor(@Nullable DBFunctionsProvider dbProvider, @NotNull ServerPaths serverPaths, @NotNull ZipFactory zipFactory, @NotNull BackupConfig config, boolean singleUserMode, int mprocId, @NotNull Logger maintenanceLogger)
-
-
Method Detail
-
getProcessKind
@NotNull public final MaintenanceProcessKind getProcessKind()
Description copied from interface:BackupProcess
Returns kind of this process.- Specified by:
getProcessKind
in interfaceBackupProcess
-
getProgressInfo
@NotNull public final ProgressInfo getProgressInfo()
Description copied from interface:BackupProcess
Returns the progress in percents and a name of phase.- Specified by:
getProgressInfo
in interfaceBackupProcess
- Returns:
- the progress in percents and a name of phase.
-
getFinalFile
public final File getFinalFile()
Full backup zip file name.- Returns:
- backup file name.
-
getReport
@NotNull public final BackupReport getReport()
-
getBriefInfo
@NotNull public final BackupBriefProcessInfo getBriefInfo()
Description copied from interface:BackupProcess
Returns brief info of the process.Note: the BackupBriefProcessInfo#getFileSize() in the returned datum may return 0 till backup is finished. Tracking the archive size during the backup process is not maintained.
- Specified by:
getBriefInfo
in interfaceBackupProcess
- Returns:
- brief info.
-
getProcessId
public final int getProcessId()
Returns the maintenance process identifier. This identifier is an internal identified of the maintenance process, it doesn't relate to operating system process identifiers or something else.- Returns:
- the maintenance process identifier.
-
getProgressStatus
@NotNull public ProgressStatus getProgressStatus()
-
isFinished
public boolean isFinished()
Determines that the process already has finished or has been stopped or never will run. In other words, the associated thread (if it was) already has completed its work.- Returns:
- is stopped.
-
getExceptions
@NotNull public final Exception[] getExceptions()
Returns exceptions that occurred during process performing.- Returns:
- occurred exceptions in time order.
-
hasExceptions
public final boolean hasExceptions()
Determines whether errors occurred during process performing.- Returns:
- true if there are exceptions.
-
cancel
public final void cancel()
-
-