You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Nicolas Toper (JIRA)" <ji...@apache.org> on 2007/02/20 20:45:06 UTC

[jira] Updated: (JCR-556) Refactoring of the BackupTool

     [ https://issues.apache.org/jira/browse/JCR-556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nicolas Toper updated JCR-556:
------------------------------

    Attachment: VisitorPattern200207.patch

Hi,

I still haven't quit working on the backup tool. Thanks to Jukka, I have found a much easier solution to backup the workspace content: work at the persistence manager level directly. 

But to achieve this idea, I had to write a Visitor pattern to the PersistenceManager system. I needed a fast iteration on all nodes in order to backup them with a small memory footprint (restore can take longer so it is less of  an issue).  I couldn't reuse the Visitor facilities provided by the JCR API since I need to work at a much lower level.

This is the patch I now propose to the Jackrabbit community. It is composed of 3 files:

- ItemStateVisitor is an interface. A visitor of an ItemState must implement it

- VisitableItemStateCollection is an interface. Every class implementing this interface can be visited by an ItemStateVisitor. (Those classes are more general than  

- A patch to DatabasePersistenceManager implementing VisitableItemStateCollection. With it most repository are backup ready. It will be used also as a "proof of concept" code for other contributors who might want to implement the visitor interface to others peristence manager. 

If this patch is accepted, I will finish working on the backup/restore method of the backup tool (those are the last steps) and add a fallback code so all repository can be backuped albeit in a slower way.

BR,
Nico

> Refactoring of the BackupTool
> -----------------------------
>
>                 Key: JCR-556
>                 URL: https://issues.apache.org/jira/browse/JCR-556
>             Project: Jackrabbit
>          Issue Type: Improvement
>            Reporter: Nicolas Toper
>            Priority: Minor
>         Attachments: BIO.patch, patch-backup-040906.txt, patch-jr-010906-NodeVersionHistoriesUpdatableStateManager.txt, patch-jr-010906-PropInfo.txt, patch-jr-010906-RepositoryImpl.txt, patch-jr-010906-SysViewImporter.txt, patch-jr-010906-VersionManagerImpl.txt, PropInfo.patch, VisitorPattern200207.patch
>
>
> The BackupTool has still some refactoring to perform. I will propose the patch on this new issue since we cannot change the JCR-442 (Google wants to see a place where all the Google SoC work is).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.