com.application.areca.impl.handler
Class DeltaArchiveHandler

java.lang.Object
  extended by com.application.areca.impl.handler.AbstractArchiveHandler
      extended by com.application.areca.impl.handler.DeltaArchiveHandler
All Implemented Interfaces:
ArchiveHandler, Duplicable

public class DeltaArchiveHandler
extends AbstractArchiveHandler

Handler that processes delta archives.

Author:
Olivier PETRUCCI

Areca Build ID : 7299034069467778562

Field Summary
protected static java.lang.String SEQUENCE_FILE
          sequence filename
 
Fields inherited from class com.application.areca.impl.handler.AbstractArchiveHandler
medium
 
Fields inherited from interface com.application.areca.impl.handler.ArchiveHandler
MODE_MERGE, MODE_RECOVER
 
Constructor Summary
DeltaArchiveHandler()
           
 
Method Summary
 void archiveDeleted(java.io.File archive)
          Delete the local sequence files associated to the deleted archive
 boolean autonomousArchives()
          Tells whether the handler builds autonomous archives
 void close(ProcessContext context)
          Close the handler
 RecoveryFilterMap dispatchEntries(java.io.File[] archives, java.lang.String[] entriesToRecover)
          Return, for the array of entries passed as argument, the archives that will have to be recovered among the archive list passed as argument.
 Duplicable duplicate()
          Create a copy of the Duplicable
 java.io.File getContentFile(java.io.File archive)
          Ugly but no time to do better
 java.lang.String getSequenceFileName()
          Return the final sequence file name
 void init(ProcessContext context)
          Init the handler
 void recoverRawData(java.io.File[] archivesToRecover, RecoveryFilterMap filtersByArchive, short mode, ProcessContext context)
          Restore the data
protected  void recoverRawFile(java.io.File f, java.io.File target, java.io.File[] localFiles, int i, java.lang.String localPath, int mode, ProcessContext context)
           
 void store(FileSystemRecoveryEntry entry, java.io.InputStream in, java.io.OutputStream out, ProcessContext context)
          The outputStream is provided by the Medium itself.
 boolean supportsImageBackup()
          Tells whether the handler supports image backups or not
(some handlers are inherently incompatible with image backups)
 
Methods inherited from class com.application.areca.impl.handler.AbstractArchiveHandler
equals, getMedium, hashCode, setMedium
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SEQUENCE_FILE

protected static final java.lang.String SEQUENCE_FILE
sequence filename

See Also:
Constant Field Values
Constructor Detail

DeltaArchiveHandler

public DeltaArchiveHandler()
Method Detail

getSequenceFileName

public java.lang.String getSequenceFileName()
Return the final sequence file name


close

public void close(ProcessContext context)
           throws java.io.IOException,
                  ApplicationException
Description copied from interface: ArchiveHandler
Close the handler

Throws:
java.io.IOException
ApplicationException

init

public void init(ProcessContext context)
          throws java.io.IOException
Description copied from interface: ArchiveHandler
Init the handler

Throws:
java.io.IOException

store

public void store(FileSystemRecoveryEntry entry,
                  java.io.InputStream in,
                  java.io.OutputStream out,
                  ProcessContext context)
           throws ApplicationException,
                  java.io.IOException,
                  TaskCancelledException
Description copied from interface: ArchiveHandler
The outputStream is provided by the Medium itself. The inputStream is provided by the target.
Reads the inputStream and writes the data in the outputStream, according to the handler's strategy. (standard storage mode, delta storage, ...)

Throws:
ApplicationException
java.io.IOException
TaskCancelledException

archiveDeleted

public void archiveDeleted(java.io.File archive)
                    throws java.io.IOException
Delete the local sequence files associated to the deleted archive

Throws:
java.io.IOException

recoverRawData

public void recoverRawData(java.io.File[] archivesToRecover,
                           RecoveryFilterMap filtersByArchive,
                           short mode,
                           ProcessContext context)
                    throws java.io.IOException,
                           ApplicationException,
                           TaskCancelledException
Description copied from interface: ArchiveHandler
Restore the data

Throws:
java.io.IOException
ApplicationException
TaskCancelledException

recoverRawFile

protected void recoverRawFile(java.io.File f,
                              java.io.File target,
                              java.io.File[] localFiles,
                              int i,
                              java.lang.String localPath,
                              int mode,
                              ProcessContext context)
                       throws java.io.IOException,
                              TaskCancelledException,
                              ApplicationException
Throws:
java.io.IOException
TaskCancelledException
ApplicationException

dispatchEntries

public RecoveryFilterMap dispatchEntries(java.io.File[] archives,
                                         java.lang.String[] entriesToRecover)
                                  throws ApplicationException,
                                         java.io.IOException
Description copied from interface: ArchiveHandler
Return, for the array of entries passed as argument, the archives that will have to be recovered among the archive list passed as argument.
The returned map contains entries indexed by archive file.
entriesToRecover MUST be sorted

Throws:
ApplicationException
java.io.IOException

duplicate

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


supportsImageBackup

public boolean supportsImageBackup()
Description copied from interface: ArchiveHandler
Tells whether the handler supports image backups or not
(some handlers are inherently incompatible with image backups)


getContentFile

public java.io.File getContentFile(java.io.File archive)
Description copied from interface: ArchiveHandler
Ugly but no time to do better


autonomousArchives

public boolean autonomousArchives()
Description copied from interface: ArchiveHandler
Tells whether the handler builds autonomous archives