jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas " <nto...@gmail.com>
Subject Adding two iterator methods to PersistenceManager interface
Date Wed, 14 Feb 2007 17:26:23 GMT
Hi,

I wish to add two methods to PersistenceManager Interface. They would return
an Iterator object of the content of the persistence manager. They would be
optimized for iterating on all the NodeState and PropertyState stored in a
specific persistence layer.

Iterating directly at the persistence manager level allows efficicient
optimisation based on the underlying data-model and not according to the
graph model of the repository. Ie: optimized SQL requests for the
DbPersistenceManager or direct file system traversal for the file based
persistence layers. This way iterating on the content of a repository will
be a lot faster.

    /**
     * Returns an iterator over the PropertyState accessible by this
persistence manager.
     * There are no guarantees concerning the order in which the elements
are returned
     * @return
     */
    Iterator iteratorPropertyState();


    /**
     * Returns an iterator over the NodeState accessible by this persistence
manager.
     * There are no guarantees concerning the order in which the elements
are returned
     * @return
     */
    Iterator iteratorNodeState();

Since I do not expect all persistence manager to implement this new
interface, I will write a fallback generic iterator method in
AbstractPersistenceManager. It will iterate on the repository graph (using
load and getChildNodeEntries methods). Hence, this feature wille be provided
to all persistence manager.

On my side, I will be able to implement a low XML format for the backup tool
solving different issues at the same time: versionning constraints and
importXML high overhead. From a more general point of view, it will allow
easier and more performant traversal of content of a repository.

If you agree on this addition, I will put on JIRA in the next few days the
codes for your opinion.

Do you agree on this update and this process?


BR,
Nico
my blog! http://www.deviant-abstraction.net !!

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message