Class AbstractBackupJob

java.lang.Object
org.exoplatform.services.jcr.ext.backup.impl.AbstractBackupJob
All Implemented Interfaces:
Runnable, BackupJob
Direct Known Subclasses:
AbstractFullBackupJob, AbstractIncrementalBackupJob

public abstract class AbstractBackupJob extends Object implements BackupJob
Created by The eXo Platform SAS Date: 05.02.2008
Version:
$Id: AbstrackBackupJob.java 760 2008-02-07 15:08:07Z pnedonosko $
Author:
Peter Nedonosko
  • Field Details

    • state

      protected volatile int state
    • id

      protected int id
    • config

      protected BackupConfig config
    • repository

      protected org.exoplatform.services.jcr.core.ManageableRepository repository
    • workspaceName

      protected String workspaceName
    • timeStamp

      protected Calendar timeStamp
    • url

      protected URL url
  • Constructor Details

    • AbstractBackupJob

      public AbstractBackupJob()
  • Method Details

    • createStorage

      protected abstract URL createStorage() throws FileNotFoundException, IOException
      This method is called by run() and resume() Backup implementation knows how to create new storage
      Returns:
      URL of new storage
      Throws:
      FileNotFoundException
      IOException
    • getStorageURL

      public final URL getStorageURL()
      Description copied from interface: BackupJob
      Getting storage URL.
      Specified by:
      getStorageURL in interface BackupJob
      Returns:
      URL return the storage URL
      See Also:
    • getState

      public final int getState()
      Description copied from interface: BackupJob
      Getting state of job.
      Specified by:
      getState in interface BackupJob
      Returns:
      int return the state of job
    • getId

      public final int getId()
      Description copied from interface: BackupJob
      Getting the id of job.
      Specified by:
      getId in interface BackupJob
      Returns:
      int return id
    • addListener

      public void addListener(BackupJobListener listener)
      Description copied from interface: BackupJob
      Adding listener.
      Specified by:
      addListener in interface BackupJob
      Parameters:
      listener - BackupJobListener, the job listener
    • removeListener

      public void removeListener(BackupJobListener listener)
      Description copied from interface: BackupJob
      Remove listener.
      Specified by:
      removeListener in interface BackupJob
      Parameters:
      listener - BackupJobListener, the job listener
    • notifyListeners

      protected void notifyListeners()
      Notify all listeners about the job state changed
    • notifyError

      protected void notifyError(String message, Throwable error)
      Notify all listeners about an error
      Parameters:
      error - - Throwable instance