com.application.areca.impl
Class IncrementalDirectoryMedium

java.lang.Object
  extended by com.application.areca.AbstractMedium
      extended by com.application.areca.impl.AbstractFileSystemMedium
          extended by com.application.areca.impl.AbstractIncrementalFileSystemMedium
              extended by com.application.areca.impl.IncrementalDirectoryMedium
All Implemented Interfaces:
ArchiveMedium, IndicatorTypes, TargetActions, Duplicable

public class IncrementalDirectoryMedium
extends AbstractIncrementalFileSystemMedium

Incremental medium that stores data in individual files (compressed or not)

Author:
Olivier PETRUCCI

Areca Build ID : 7299034069467778562

Nested Class Summary
 
Nested classes/interfaces inherited from class com.application.areca.impl.AbstractIncrementalFileSystemMedium
AbstractIncrementalFileSystemMedium.CheckHash
 
Field Summary
 
Fields inherited from class com.application.areca.impl.AbstractIncrementalFileSystemMedium
CHECK_DESTINATION, CONTENT_FILE, DEBUG_MODE, handler, HASH_FILE, imageBackups, METADATA_FILE, RESERVED_NAMES, TMP_MERGE_LOCATION, TRACE_FILE, trackPermissions
 
Fields inherited from class com.application.areca.impl.AbstractFileSystemMedium
CHECK_DIRECTORY_CONSISTENCY, COMMIT_MARKER_NAME, compressionArguments, DATA_DIRECTORY_SUFFIX, encryptionPolicy, fileSystemPolicy, MANIFEST_FILE, TARGET_BACKUP_FILE_PREFIX, TARGET_BACKUP_FILE_SUFFIX, tool
 
Fields inherited from class com.application.areca.AbstractMedium
history, HISTORY_NAME, target
 
Fields inherited from interface com.application.areca.TargetActions
ACTION_ALL, ACTION_BACKUP, ACTION_DESCRIBE, ACTION_INDICATORS, ACTION_MERGE_OR_DELETE, ACTION_RECOVER, ACTION_SIMULATE
 
Fields inherited from interface com.application.areca.indicator.IndicatorTypes
N_APS, N_NOA, N_NOF, N_PSR, N_SFS, N_SOH, N_SRR, N_SWH, T_APS, T_NOA, T_NOF, T_PSR, T_SFS, T_SOH, T_SRR, T_SWH
 
Constructor Summary
IncrementalDirectoryMedium()
           
 
Method Summary
protected  void buildMergedArchiveFromDirectory(ProcessContext context)
           
protected  FileSystemDriver buildStorageDriver(java.io.File storageDir)
           
 void cleanLocalCopies(java.util.List copies, ProcessContext context)
           
protected  void closeArchive(ProcessContext context)
           
 void commitBackup(ProcessContext context)
          Close the archive
 void completeLocalCopyCleaning(java.io.File copy, ProcessContext context)
           
protected  void computeMergeDirectories(ProcessContext context)
           
protected  void convertArchiveToFinal(ProcessContext context)
           
 Duplicable duplicate()
          Create a copy of the Duplicable
 java.io.File[] ensureLocalCopy(java.io.File[] archivesToProcess, boolean overrideRecoveredFiles, java.io.File destination, RecoveryFilterMap filtersByArchive, ProcessContext context)
          Ensure that the stored files are present on the local disk.
protected  java.lang.String getArchiveExtension()
           
 java.lang.String getDescription()
          Return a description for the medium
 int getMaxRetries()
           
protected  void prepareContext(ProcessContext context)
           
protected  void registerUnstoredFile(FileSystemRecoveryEntry entry, ProcessContext context)
           
 boolean retrySupported()
           
protected  void storeFileInArchive(FileSystemRecoveryEntry entry, java.io.InputStream in, ProcessContext context)
          Stocke le fichier passe en argument dans l'archive (independemment des filtres, ou politique de stockage; il s'agit la d'une methode purement utilitaire; en pratique : zip ou repertoire)
 
Methods inherited from class com.application.areca.impl.AbstractIncrementalFileSystemMedium
buildArchive, buildAtomicEntrySet, buildDefaultBackupManifest, buildDefaultMergeManifest, checkArchives, checkFileSystemPolicy, cleanMerge, cleanUnwantedFiles, closeSimulation, commitMerge, computeArchiveName, computeArchivePath, computeFinalArchivePath, copyAttributes, deleteArchive, doAndRetry, duplicateMetadataFile, getArchiveData, getArchiveSize, getContentFileName, getEntries, getHandler, getHashFileName, getLastArchive, getLogicalView, getMetaDataFileName, getTraceFileName, initMergeManifest, install, isOverwrite, isTrackPermissions, isWorkingDirectory, listArchives, logRecoveryStep, matchArchiveName, merge, open, recover, recover, rollbackBackup, rollbackMerge, search, setHandler, setOverwrite, setTrackPermissions, simulateEntryProcessing, store, storeManifest, supportsBackupScheme
 
Methods inherited from class com.application.areca.impl.AbstractFileSystemMedium
buildBaseDriver, checkArchiveCompatibility, checkMediumState, checkRepository, clearRelatedCaches, computeIndicators, computeMarkerFile, computeMarkerFile, deleteArchives, destroyRepository, destroyTemporaryFile, doAfterDelete, doBeforeDelete, getCompressionArguments, getDataDirectory, getDisplayArchivePath, getEncryptionPolicy, getFileSystemPolicy, getHistory, getHistory, getLastArchive, getManifestName, isCommitted, isPreBackupCheckUseful, markCommitted, setCompressionArguments, setEncryptionPolicy, setFileSystemPolicy, setTarget, storeTargetConfigBackup, toString
 
Methods inherited from class com.application.areca.AbstractMedium
equals, getHistoryName, getTarget, hashCode, processEntryArchiveData
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IncrementalDirectoryMedium

public IncrementalDirectoryMedium()
Method Detail

duplicate

public Duplicable duplicate()
Description copied from interface: Duplicable
Create a copy of the Duplicable


buildStorageDriver

protected FileSystemDriver buildStorageDriver(java.io.File storageDir)
                                       throws ApplicationException
Overrides:
buildStorageDriver in class AbstractFileSystemMedium
Throws:
ApplicationException

getDescription

public java.lang.String getDescription()
Return a description for the medium


prepareContext

protected void prepareContext(ProcessContext context)
                       throws java.io.IOException
Specified by:
prepareContext in class AbstractIncrementalFileSystemMedium
Throws:
java.io.IOException

registerUnstoredFile

protected void registerUnstoredFile(FileSystemRecoveryEntry entry,
                                    ProcessContext context)
                             throws java.io.IOException
Specified by:
registerUnstoredFile in class AbstractIncrementalFileSystemMedium
Throws:
java.io.IOException

getMaxRetries

public int getMaxRetries()
Specified by:
getMaxRetries in class AbstractIncrementalFileSystemMedium

retrySupported

public boolean retrySupported()
Specified by:
retrySupported in class AbstractIncrementalFileSystemMedium

storeFileInArchive

protected void storeFileInArchive(FileSystemRecoveryEntry entry,
                                  java.io.InputStream in,
                                  ProcessContext context)
                           throws java.io.IOException,
                                  ApplicationException,
                                  TaskCancelledException
Description copied from class: AbstractFileSystemMedium
Stocke le fichier passe en argument dans l'archive (independemment des filtres, ou politique de stockage; il s'agit la d'une methode purement utilitaire; en pratique : zip ou repertoire)

Specified by:
storeFileInArchive in class AbstractFileSystemMedium
Throws:
java.io.IOException
ApplicationException
TaskCancelledException

completeLocalCopyCleaning

public void completeLocalCopyCleaning(java.io.File copy,
                                      ProcessContext context)
                               throws java.io.IOException,
                                      ApplicationException
Specified by:
completeLocalCopyCleaning in class AbstractIncrementalFileSystemMedium
Throws:
java.io.IOException
ApplicationException

cleanLocalCopies

public void cleanLocalCopies(java.util.List copies,
                             ProcessContext context)
                      throws java.io.IOException,
                             ApplicationException
Specified by:
cleanLocalCopies in class AbstractIncrementalFileSystemMedium
Throws:
java.io.IOException
ApplicationException

ensureLocalCopy

public java.io.File[] ensureLocalCopy(java.io.File[] archivesToProcess,
                                      boolean overrideRecoveredFiles,
                                      java.io.File destination,
                                      RecoveryFilterMap filtersByArchive,
                                      ProcessContext context)
                               throws java.io.IOException,
                                      ApplicationException,
                                      TaskCancelledException
Description copied from class: AbstractIncrementalFileSystemMedium
Ensure that the stored files are present on the local disk. Useful for some archive handlers that need to ensure this before processing the archives.
Return a set of directories where local copies can be found.
This set is :
- either of length 1 (if overrideRecoveredFiles = true)
- either of exact same length as archivesToProcess

Specified by:
ensureLocalCopy in class AbstractIncrementalFileSystemMedium
Throws:
java.io.IOException
ApplicationException
TaskCancelledException

closeArchive

protected void closeArchive(ProcessContext context)
                     throws java.io.IOException,
                            ApplicationException
Specified by:
closeArchive in class AbstractIncrementalFileSystemMedium
Throws:
java.io.IOException
ApplicationException

computeMergeDirectories

protected void computeMergeDirectories(ProcessContext context)
Specified by:
computeMergeDirectories in class AbstractIncrementalFileSystemMedium

buildMergedArchiveFromDirectory

protected void buildMergedArchiveFromDirectory(ProcessContext context)
                                        throws ApplicationException
Specified by:
buildMergedArchiveFromDirectory in class AbstractIncrementalFileSystemMedium
Throws:
ApplicationException

commitBackup

public void commitBackup(ProcessContext context)
                  throws ApplicationException
Description copied from class: AbstractIncrementalFileSystemMedium
Close the archive

Specified by:
commitBackup in interface ArchiveMedium
Overrides:
commitBackup in class AbstractIncrementalFileSystemMedium
Throws:
ApplicationException

convertArchiveToFinal

protected void convertArchiveToFinal(ProcessContext context)
                              throws java.io.IOException,
                                     ApplicationException
Overrides:
convertArchiveToFinal in class AbstractIncrementalFileSystemMedium
Throws:
java.io.IOException
ApplicationException

getArchiveExtension

protected java.lang.String getArchiveExtension()
Specified by:
getArchiveExtension in class AbstractFileSystemMedium