jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobias Bocanegra" <tobias.bocane...@day.com>
Subject Re: Main Entry Point for Backup Tool
Date Mon, 26 Jun 2006 08:05:36 GMT
hi,
i would not use 'save' / 'restore', since those methods already have
different semantics on other occasions. i thought it was discussed,
that the use of inpourt/output streams should be avoided, and that
some sort of I/O context is provided?

regards, toby

On 6/25/06, Nicolas Toper <ntoper@gmail.com> wrote:
> Hi,
>
> I am updating the RepositoryImpl class. Here is what it looks like (below).
>
> We have agreed on using In/OutputStream. However, now that I have advanced a
> little bit in the code, it raises a problem: I cannot use nio and since it
> is huge dataset, I would prefer to use it for performance issue. What do you
> think?
>
> Nicolas
> my blog! http://www.deviant-abstraction.net !!
>     /**
>      *
>      * This method restores data from an InputStream.
>      *
>      * @param InputStream savedData: InputStream containing the backup (and
> its parameters).
>      * @param File workingFolder: the folder used to unzip all data.
>      *
>      * @throws RestoreException. Generic exception during restore operation.
>      *
>      * @author: Nicolas Toper <ntoper@gmail.com>
>      *
>      */
>     public void restore(InputStream savedData, File workingFolder) throws
> RestoreException {
>
>         BackupRepository saveRepo = new BackupRepository(this, savedData,
> workingFolder);
>         saveRepo.restore();
>     }
>
>
>     /**
>      *
>      * This method saves from this repository to an OutputStream.
>      *
>      * @param outputStream out: Outputstream where the backup should be.
>      * @param BackupConfig conf: BackupConfig object containing all the
> parameters.
>      *
>      * @throws SavingException. Generic exception during saving operation.
>      *
>      * @author: Nicolas Toper <ntoper@gmail.com>
>      *
>      */
>     public void save(OutputStream out, BackupConfig conf) throws
> SavingException{
>
>         conf.init(this);
>         BackupRepository saveRepo = (BackupRepository) conf.getBackup();
>         saveRepo.save(out, conf);
>     }
>
>


-- 
-----------------------------------------< tobias.bocanegra@day.com >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---

Mime
View raw message