On 19.10.15 5:17 , Bertrand Delacretaz wrote:
Hi,

On Mon, Oct 19, 2015 at 5:00 PM, Michael Dürig <[email protected]> wrote:
... [1] https://issues.apache.org/jira/browse/OAK-1133 ..

Unless I missed something that issue discusses the ObservationListener
Plus principles, but doesnt describe how to use it - can you show us
some relevant examples or docs?


The "ObservationListener Plus" mechanism relies on Oak's EventFilter instances to specify the set of events. Those instances are pushed as deeply down into the stack as possible such that only those events are actually generated and sent that are specified by the filter. Additionally when filtering by path(s) Oak will try to look at as little subtrees as possible.

The "ObservationListener Plus" mechanism currently backs Oak's implementation of ObservationManager and JackrabbitObservationManager. The latter of which has support for including/excluding multiple subtrees (see Javadoc).

In a nutshell, if your filter is specific enough to not include any unwanted events, Oak will never generate those. Not even internally.

If above APIs do not allow for sufficiently exact specification for what you need in Sling we could discuss ways to expose Oak's internal mechanisms for building even richer filters. I can provide pointers here if required.

Michael

Reply via email to