com.application.areca
Interface ArchiveMedium

All Superinterfaces:
Duplicable
All Known Implementing Classes:
AbstractFileSystemMedium, AbstractIncrementalFileSystemMedium, AbstractMedium, IncrementalDirectoryMedium, IncrementalZipMedium

public interface ArchiveMedium
extends Duplicable


Interface that defines an abstract storage medium.

Author:
Olivier PETRUCCI

Areca Build ID : 7299034069467778562

Method Summary
 void checkArchives(java.lang.Object destination, boolean checkOnlyArchiveContent, java.util.GregorianCalendar date, ProcessContext context)
          Check the archive denoted by the date passed as argument.
 ActionReport checkMediumState(int action)
          Check the medium's state
 void closeSimulation(ProcessContext context)
          Closes the simulation and returns all unprocessed entries (ie entries which have been deleted).
 void commitBackup(ProcessContext context)
          Validate the backup
 void commitMerge(ProcessContext context)
          Validate the "merge"
 IndicatorMap computeIndicators()
          Computes indicators on the archives stored by the medium.
 void deleteArchives(java.util.GregorianCalendar fromDate, ProcessContext context)
          Delete the archives that have been created between fromDate and toDate
 void destroyRepository()
          Destroy all archives.
 void doAfterDelete()
          Callback which is invoked after deletion
 void doBeforeDelete()
          Callback which is invoked before deletion
 java.lang.String getDescription()
          Return a description of the storage medium
 java.util.List getEntries(AggregatedViewContext context, java.lang.String root, java.util.GregorianCalendar date)
          Return the content of the archive matching the date passed as argument
 History getHistory()
          Return the history of all operations performed on the medium (merges, backups, ...)
 EntryArchiveData[] getHistory(java.lang.String entry)
          Return the entry's history
 java.util.List getLogicalView(AggregatedViewContext context, java.lang.String root, boolean aggregatedView)
          Return a "logical view" of the target's content
 AbstractRecoveryTarget getTarget()
          Return the target to which the medium is bound
 void install()
          Set up all necessary objects for the medium (for instance file system drivers)
 boolean isPreBackupCheckUseful()
          Tells whether it is useful to perform a pre-check before backup.
 void merge(java.util.GregorianCalendar fromDate, java.util.GregorianCalendar toDate, Manifest manifest, boolean keepDeletedEntries, ProcessContext context)
          Merge the archives that have been created between fromDate and toDate.
 void open(Manifest manifest, ProcessContext context, java.lang.String backupScheme)
          Open the medium.
 void recover(java.lang.Object destination, java.lang.String[] filter, java.util.GregorianCalendar date, boolean keepDeletedEntries, boolean checkRecoveredFiles, ProcessContext context)
          Recovers all entries matching the filter passed as argument, as of the date passed as argument.
 void rollbackBackup(ProcessContext context)
          Cancel the backup
 void rollbackMerge(ProcessContext context)
          Cancel the "merge"
 TargetSearchResult search(SearchCriteria criteria)
          Searches entries within the archives
 void setTarget(AbstractRecoveryTarget target, boolean revalidate)
          Set the medium's target
 void simulateEntryProcessing(RecoveryEntry entry, boolean haltOnFirstDifference, ProcessContext context)
          Simulates the processing of the entry passed as argument.
 void store(RecoveryEntry entry, ProcessContext context)
          Stores the entry passed as argument
 boolean supportsBackupScheme(java.lang.String backupScheme)
          Tells whether the backup scheme passed as argument is supported by the medium or not
 
Methods inherited from interface com.myJava.object.Duplicable
duplicate
 

Method Detail

checkMediumState

ActionReport checkMediumState(int action)
Check the medium's state


store

void store(RecoveryEntry entry,
           ProcessContext context)
           throws StoreException,
                  ApplicationException,
                  TaskCancelledException
Stores the entry passed as argument

Throws:
StoreException
ApplicationException
TaskCancelledException

merge

void merge(java.util.GregorianCalendar fromDate,
           java.util.GregorianCalendar toDate,
           Manifest manifest,
           boolean keepDeletedEntries,
           ProcessContext context)
           throws ApplicationException,
                  TaskCancelledException
Merge the archives that have been created between fromDate and toDate.

Throws:
ApplicationException
TaskCancelledException

deleteArchives

void deleteArchives(java.util.GregorianCalendar fromDate,
                    ProcessContext context)
                    throws ApplicationException,
                           TaskCancelledException
Delete the archives that have been created between fromDate and toDate

Throws:
ApplicationException
TaskCancelledException

recover

void recover(java.lang.Object destination,
             java.lang.String[] filter,
             java.util.GregorianCalendar date,
             boolean keepDeletedEntries,
             boolean checkRecoveredFiles,
             ProcessContext context)
             throws ApplicationException,
                    TaskCancelledException
Recovers all entries matching the filter passed as argument, as of the date passed as argument.

Throws:
ApplicationException
TaskCancelledException

checkArchives

void checkArchives(java.lang.Object destination,
                   boolean checkOnlyArchiveContent,
                   java.util.GregorianCalendar date,
                   ProcessContext context)
                   throws ApplicationException,
                          TaskCancelledException
Check the archive denoted by the date passed as argument.
Files are recovered at the location passed as argument and verified against their hash code.
The result is stored in the context (see ProcessContext.getUncheckedRecoveredFiles() and ProcessContext.getInvalidRecoveredFiles()).

The destination can be null. In this case, archives are temporarily recovered in a subdirectory of their storage location.

Throws:
ApplicationException
TaskCancelledException

destroyRepository

void destroyRepository()
                       throws ApplicationException,
                              TaskCancelledException
Destroy all archives.
Useful when the target is deleted.

Throws:
ApplicationException
TaskCancelledException

open

void open(Manifest manifest,
          ProcessContext context,
          java.lang.String backupScheme)
          throws ApplicationException
Open the medium. This method is called before the backup is performed.

Throws:
ApplicationException

commitBackup

void commitBackup(ProcessContext context)
                  throws ApplicationException
Validate the backup

Throws:
ApplicationException

rollbackBackup

void rollbackBackup(ProcessContext context)
                    throws ApplicationException
Cancel the backup

Throws:
ApplicationException

commitMerge

void commitMerge(ProcessContext context)
                 throws ApplicationException
Validate the "merge"

Throws:
ApplicationException

rollbackMerge

void rollbackMerge(ProcessContext context)
                   throws ApplicationException
Cancel the "merge"

Throws:
ApplicationException

getTarget

AbstractRecoveryTarget getTarget()
Return the target to which the medium is bound


getDescription

java.lang.String getDescription()
Return a description of the storage medium


getHistory

History getHistory()
Return the history of all operations performed on the medium (merges, backups, ...)


getEntries

java.util.List getEntries(AggregatedViewContext context,
                          java.lang.String root,
                          java.util.GregorianCalendar date)
                          throws ApplicationException
Return the content of the archive matching the date passed as argument

Throws:
ApplicationException

getLogicalView

java.util.List getLogicalView(AggregatedViewContext context,
                              java.lang.String root,
                              boolean aggregatedView)
                              throws ApplicationException
Return a "logical view" of the target's content

Throws:
ApplicationException

getHistory

EntryArchiveData[] getHistory(java.lang.String entry)
                              throws ApplicationException
Return the entry's history

Throws:
ApplicationException

doBeforeDelete

void doBeforeDelete()
Callback which is invoked before deletion


doAfterDelete

void doAfterDelete()
Callback which is invoked after deletion


simulateEntryProcessing

void simulateEntryProcessing(RecoveryEntry entry,
                             boolean haltOnFirstDifference,
                             ProcessContext context)
                             throws ApplicationException
Simulates the processing of the entry passed as argument.
Used during backup simulation.

Throws:
ApplicationException

closeSimulation

void closeSimulation(ProcessContext context)
                     throws ApplicationException
Closes the simulation and returns all unprocessed entries (ie entries which have been deleted).

Throws:
ApplicationException

isPreBackupCheckUseful

boolean isPreBackupCheckUseful()
Tells whether it is useful to perform a pre-check before backup.
It can be used, for instance, to check whether at least one file has been modified.


computeIndicators

IndicatorMap computeIndicators()
                               throws ApplicationException,
                                      TaskCancelledException
Computes indicators on the archives stored by the medium.

Throws:
ApplicationException
TaskCancelledException

search

TargetSearchResult search(SearchCriteria criteria)
                          throws ApplicationException
Searches entries within the archives

Throws:
ApplicationException

install

void install()
             throws ApplicationException
Set up all necessary objects for the medium (for instance file system drivers)

Throws:
ApplicationException

setTarget

void setTarget(AbstractRecoveryTarget target,
               boolean revalidate)
Set the medium's target


supportsBackupScheme

boolean supportsBackupScheme(java.lang.String backupScheme)
Tells whether the backup scheme passed as argument is supported by the medium or not