You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Michael Dürig <md...@apache.org> on 2012/12/11 15:40:01 UTC

Re: svn commit: r1420138 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak: query/ query/ast/ query/index/ spi/query/


On 11.12.12 12:57, thomasm@apache.org wrote:
>       private boolean prepared;
> -    private Root root;
> +    private Root rootTree;

I'd leave these at root and only use rootTree for variables of type 
Tree, which hold the root node of a tree (i.e. Tree rootTree = 
root.getTree("/")).

Michael

Re: svn commit: r1420138 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak: query/ query/ast/ query/index/ spi/query/

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Tue, Dec 11, 2012 at 4:40 PM, Michael Dürig <md...@apache.org> wrote:
> On 11.12.12 12:57, thomasm@apache.org wrote:
>> -    private Root root;
>> +    private Root rootTree;
>
> I'd leave these at root and only use rootTree for variables of type Tree,
> which hold the root node of a tree (i.e. Tree rootTree = root.getTree("/")).

Could we refactor the code so that the QueryEngine instance doesn't
need a direct Root reference? I.e. it would only have a reference to
the root Tree of the current repository snapshot. AFAICT the query
engine only needs the Root to be able to look up Tree instances, much
less than the commit/refresh/etc. functionality offered by Root.

BR,

Jukka Zitting