Lazy child nodes iteration feature is accessible via the
interface, the inheritor
javax.jcr.Node. It provides a new single method shown below:
* Returns a NodeIterator over all child Nodes of this Node. Does not include properties
* of this Node. If this node has no child nodes, then an empty iterator is returned.
* @return A NodeIterator over all child Nodes of this <code>Node</code>.
* @throws RepositoryException If an error occurs.
public NodeIterator getNodesLazily() throws RepositoryException;
From the view of end-user or client application,
works similar to JCR specified
iterator supports the same set of features as an ordinary NodeIterator,
skip() and excluding
remove() features. "Lazy" implementation
performs reading from DB by pages. Each time when it has no more
elements stored in memory, it reads the next set of items from persistent
layer. This set is called "page". The
fully supports session and transaction changes log, so it is a
functionally-full analogue of specified
getNodes() operation. Therefore, when
having a deal with huge list of child nodes,
getNodes() can be simply
and safely substituted with
JCR gives an experimental opportunity to replace all
getNodesLazily() calls. It handles a boolean system
property named "
internally replaces one call with another, without any code changes. But
be sure using it only for development purposes. This feature can be used
with the top level products using eXo JCR to perform a quick compatibility
and performance tests without changing any code. This is not recommended
to be used as a production solution.