[
https://issues.apache.org/jira/browse/SLING-4521?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stefan Seifert closed SLING-4521.
---------------------------------
> Commons OSGi: Add helper class for thread-safe access list of ranked service
> dependencies
> -----------------------------------------------------------------------------------------
>
> Key: SLING-4521
> URL: https://issues.apache.org/jira/browse/SLING-4521
> Project: Sling
> Issue Type: New Feature
> Components: Commons
> Reporter: Stefan Seifert
> Assignee: Stefan Seifert
> Priority: Minor
> Fix For: Commons OSGi 2.3.0
>
>
> the ServiceUtil.getComparableForServiceRanking method provides a great way to
> create a sorted list of service references ordered by their ranking.
> but using it still requires too much boilerplate code which has to be copied
> for each usecase, typos may be undetected and lead to subtile threading
> issue. such typos happened e.g. in the sling models implementation where
> accessing ranked list of services is used much.
> this ticket adds a new RankedServices class which implements the threading
> details and - for additional convenience - the Iterable interface to allow
> direct iteration about the references list of services in a thread-safe
> manner.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)