Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-4521

Commons OSGi: Add helper class for thread-safe access list of ranked service dependencies

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • Commons OSGi 2.3.0
    • Commons
    • 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

          Activity

            People

              sseifert Stefan Seifert
              sseifert Stefan Seifert
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: