[ 
https://issues.apache.org/jira/browse/SLING-5158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14964578#comment-14964578
 ] 

Carsten Ziegeler commented on SLING-5158:
-----------------------------------------

Some additional comments: as noted above, a resource provider using the new api 
owns the tree it is mounted at (of course there can be another resource 
provider be mounted at a lower level in the tree). This serves several 
purposes, performance is one of them but not the most important one. A 
consistent tree is the more important one and based on that we are now able to 
filter correctly search results and observation events: for example, if the JCR 
provider is at the root and there is a provider at /foo, we can now simply 
discard all search results and observation events from the JCR for anything 
under /foo - and we can do this simply based on path matching. Previously we 
needed to do a getResource on the same path just to find out if the JCR 
provider is overlayed for that path or not - which is pretty expensive. In 
addition, we could already manipulate the query and the observation listener 
registration to ignore everything below /foo.
For supporting the old resource provider interface, the wrapper needs to use 
the ResourceContext to go up the provider chain: if an "old" provider is 
mounted at /path but does not return a resource for some path, the parent 
provider needs to be asked. If that one doesn't return a resource, the parent 
provider of that one needs to be asked etc.

> Refactor ResourceResolver to use the new ResourceProvider API
> -------------------------------------------------------------
>
>                 Key: SLING-5158
>                 URL: https://issues.apache.org/jira/browse/SLING-5158
>             Project: Sling
>          Issue Type: Sub-task
>          Components: ResourceResolver
>            Reporter: Tomek Rękawek
>             Fix For: Resource Resolver 1.2.8
>
>         Attachments: SLING-5158.patch
>
>
> Change the Resource Resolver implementation to use the new ResourceProvider 
> interface and create a bridge service to support the old providers and 
> factories as well.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to