jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angela Schreiber <anch...@adobe.com>
Subject Re: Extending semantics of absPath Parameter of ObservationManager.addEventListener
Date Tue, 11 Mar 2014 13:29:36 GMT
hi michael

>Since JCR observation only supports listening on a single path per
>listener, a commonly seen pattern is listeners registered on the root
>path and then filtering for the required paths in the event handler.

yes, i have seen this a lot.

>This causes a lot of overhead in the case where the number of events on
>the target paths is low wrt. the total number of events.
>One way we could address this in an backward compatible way is to
>slightly extend the semantics of the absPath parameter and allow for a
>list of path instead of a single one. AFICS we could use | for
>separating such paths (e.g. /foo/bar|/baz/qox). This could then also be
>back ported to JR2 if needed. WDYT?

that would be an option... but one that violates the API contract as the
path param is defined to be an absolute path.

alternatively, we could make this a Jackrabbit API extension to the JCR
API and explicitly allow for multiple paths to be specified. this would be
backwards compatible as well and less error prone when it comes to
specification compliance.

kind regards

View raw message