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

Chetan Mehrotra commented on SLING-6164:
----------------------------------------

Looks fine

{code}
+++ 
bundles/api/src/main/java/org/apache/sling/spi/resource/provider/ObserverConfiguration.java
 (working copy)
@@ -61,6 +61,15 @@
     @Nonnull Set<ResourceChange.ChangeType> getChangeTypes();
 
     /**
+     * Set containing the set of property names which
+     * serves as an optional hint for the underlying to 
+     * only report property changes enlisted, ie the
+     * underlying might ignore this.
+     * @return set containing the set of property names
+     */
+    @Nonnull Set<String> getPropertyNamesHint();
{code}

In future we might add support for more hints and in such a case adding new 
methods here would lead to compatibility issue. Specially when this is an 
optional feature. May be we make it bit generic

{code}
 enum ObservationHint {PropertyName}

@Nonnull Set<String> getHint(ObservationHint hint);
{code}

wdyt?

> Introduce optional property names hint to ResourceChangeListener
> ----------------------------------------------------------------
>
>                 Key: SLING-6164
>                 URL: https://issues.apache.org/jira/browse/SLING-6164
>             Project: Sling
>          Issue Type: Improvement
>          Components: API, JCR
>    Affects Versions: JCR Resource 2.8.0, API 2.14.2
>            Reporter: Stefan Egli
>             Fix For: JCR Resource 2.9.0, API 2.15.0
>
>         Attachments: SLING-6164.patch
>
>
> As [discussed on the list|http://sling.markmail.org/thread/usq4a7pglhakd7uq] 
> it would be useful to allow resource providers to optionally filter for 
> property names for ResourceChangeListeners. We could thus introduce an 
> optional _property names hint_ osgi property to the ResourceChangeListener as 
> well as the corresponding getter to ObserverConfiguration.



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

Reply via email to