Class 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.

    • Method Detail

      • 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 interface BackupProcess
        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 interface BackupProcess
        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()
      • run

        public final void run()
        Specified by:
        run in interface Runnable
      • 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()