com.application.areca.impl
Class IncrementalZipMedium

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.IncrementalZipMedium
All Implemented Interfaces:
ArchiveMedium, IndicatorTypes, TargetActions, Duplicable

public class IncrementalZipMedium
extends AbstractIncrementalFileSystemMedium

Incremental storage support which uses an archive to store the data.

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
IncrementalZipMedium()
           
 
Method Summary
protected  void buildArchive(ProcessContext context)
          Buid the archive
protected  ArchiveAdapter buildArchiveAdapter(java.io.File f, boolean write, ProcessContext context)
          Builds an ArchiveAdapter for the file passed as argument.
protected  void buildMergedArchiveFromDirectory(ProcessContext context)
           
 void cleanLocalCopies(java.util.List copies, ProcessContext context)
           
protected  void closeArchive(ProcessContext context)
           
 void completeLocalCopyCleaning(java.io.File copy, ProcessContext context)
           
protected  void computeMergeDirectories(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 of the storage medium
 int getMaxRetries()
           
 void open(Manifest manifest, ProcessContext context, java.lang.String backupScheme)
          Prepares the backup
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)
 boolean supportsBackupScheme(java.lang.String backupScheme)
          Tells whether the backup scheme passed as argument is supported by the medium or not
 
Methods inherited from class com.application.areca.impl.AbstractIncrementalFileSystemMedium
buildAtomicEntrySet, buildDefaultBackupManifest, buildDefaultMergeManifest, checkArchives, checkFileSystemPolicy, cleanMerge, cleanUnwantedFiles, closeSimulation, commitBackup, commitMerge, computeArchiveName, computeArchivePath, computeFinalArchivePath, convertArchiveToFinal, copyAttributes, deleteArchive, doAndRetry, duplicateMetadataFile, getArchiveData, getArchiveSize, getContentFileName, getEntries, getHandler, getHashFileName, getLastArchive, getLogicalView, getMetaDataFileName, getTraceFileName, initMergeManifest, install, isOverwrite, isTrackPermissions, isWorkingDirectory, listArchives, logRecoveryStep, matchArchiveName, merge, recover, recover, rollbackBackup, rollbackMerge, search, setHandler, setOverwrite, setTrackPermissions, simulateEntryProcessing, store, storeManifest
 
Methods inherited from class com.application.areca.impl.AbstractFileSystemMedium
buildBaseDriver, buildStorageDriver, 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

IncrementalZipMedium

public IncrementalZipMedium()
Method Detail

getDescription

public java.lang.String getDescription()
Description copied from interface: ArchiveMedium
Return a description of the storage medium


buildArchive

protected void buildArchive(ProcessContext context)
                     throws java.io.IOException,
                            ApplicationException
Buid the archive

Overrides:
buildArchive in class AbstractIncrementalFileSystemMedium
Throws:
java.io.IOException
ApplicationException

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

open

public void open(Manifest manifest,
                 ProcessContext context,
                 java.lang.String backupScheme)
          throws ApplicationException
Description copied from class: AbstractIncrementalFileSystemMedium
Prepares the backup

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

closeArchive

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

supportsBackupScheme

public boolean supportsBackupScheme(java.lang.String backupScheme)
Description copied from interface: ArchiveMedium
Tells whether the backup scheme passed as argument is supported by the medium or not

Specified by:
supportsBackupScheme in interface ArchiveMedium
Overrides:
supportsBackupScheme in class AbstractIncrementalFileSystemMedium

prepareContext

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

buildArchiveAdapter

protected ArchiveAdapter buildArchiveAdapter(java.io.File f,
                                             boolean write,
                                             ProcessContext context)
                                      throws java.io.IOException,
                                             ApplicationException
Builds an ArchiveAdapter for the file passed as argument.

Throws:
java.io.IOException
ApplicationException

duplicate

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


getArchiveExtension

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

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

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

registerUnstoredFile

protected void registerUnstoredFile(FileSystemRecoveryEntry entry,
                                    ProcessContext context)
Specified by:
registerUnstoredFile in class AbstractIncrementalFileSystemMedium

computeMergeDirectories

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

buildMergedArchiveFromDirectory

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