Details
-
New Feature
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
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.
Attachments
Issue Links
- is related to
-
SLING-5041 Clarify the order of the iterator given by RankedServices
- Closed
- is required by
-
SLING-4779 Rely on RankedServices for Sling Models
- Closed