org.exoplatform.services.jcr.ext.backup.impl
Class BackupScheduler

java.lang.Object
  extended by org.exoplatform.services.jcr.ext.backup.impl.BackupScheduler

public class BackupScheduler
extends java.lang.Object

Created by The eXo Platform SAS.

Version:
$Id: BackupScheduler.java 35186 2009-08-07 14:23:43Z pnedonosko $
Author:
Peter Nedonosko

Nested Class Summary
static class BackupScheduler.TaskStatus
           
 
Field Summary
protected  org.apache.commons.logging.Log log
           
 
Method Summary
 org.exoplatform.services.jcr.ext.backup.impl.BackupScheduler.SchedulerTask findTask(java.lang.String repository, java.lang.String workspace)
          Search task by repository and workspace names
 BackupMessage[] getErrors()
           
 void schedule(BackupConfig config, java.util.Date startTime, java.util.Date stopTime, long chainPeriod, long incrementalPeriod)
          Schedule backup task with given configuration and scheduler parameters.
 void schedule(BackupConfig config, java.util.Date startTime, java.util.Date stopTime, long chainPeriod, long incrementalPeriod, BackupJobListener listener)
          Schedule backup task with given configuration and scheduler parameters.
 boolean unschedule(BackupConfig config)
          Unshedule the task scheduled before with the given configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected org.apache.commons.logging.Log log
Method Detail

getErrors

public BackupMessage[] getErrors()

schedule

public void schedule(BackupConfig config,
                     java.util.Date startTime,
                     java.util.Date stopTime,
                     long chainPeriod,
                     long incrementalPeriod)
              throws BackupSchedulerException
Schedule backup task with given configuration and scheduler parameters. The behaviour of a task vary depending on scheduler parameters. If specified

Parameters:
config -
startTime - - task start time
stopTime - - task stop time, may be null i.e. the task will be executed forever
chainPeriod - - task chain period, means periodic execution of the configured backup chain
incrementalPeriod - - incr period
listener - - listener for each job produced by an each backup chain
Throws:
BackupSchedulerException

schedule

public void schedule(BackupConfig config,
                     java.util.Date startTime,
                     java.util.Date stopTime,
                     long chainPeriod,
                     long incrementalPeriod,
                     BackupJobListener listener)
              throws BackupSchedulerException
Schedule backup task with given configuration and scheduler parameters. The behaviour of a task vary depending on scheduler parameters. If specified The method will return immediate, a task will be scheduled and started as independent thread.

Parameters:
config -
startTime - - task start time
stopTime - - task stop time, may be null i.e. the task will be executed forever
chainPeriod - - task chain period, means periodic execution of the configured backup chain
incrementalPeriod - - incr period
listener - - listener for each job produced by an each backup chain
Throws:
BackupSchedulerException

findTask

public org.exoplatform.services.jcr.ext.backup.impl.BackupScheduler.SchedulerTask findTask(java.lang.String repository,
                                                                                           java.lang.String workspace)
Search task by repository and workspace names

Parameters:
repository - - name string
workspace - - name string
Returns:
SchedulerTask

unschedule

public boolean unschedule(BackupConfig config)
                   throws BackupSchedulerException
Unshedule the task scheduled before with the given configuration. The method will waits till the task will be stopped.

Parameters:
config - - configuration used for a task search
Returns:
- true if task was searched and stopped ok
Throws:
BackupSchedulerException


Copyright © 2011 eXo Platform SAS. All Rights Reserved.