Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-653

Provide a very basic ConcurrentInitializer implementation

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.0
    • lang.concurrent.*
    • None

    Description

      It might be useful - for instance in unit tests - to have a simple implementation of ConcurrentInitializer which just returns an object that was passed to the constructor. The object is stored in a final field, so no synchronization is needed. In contrast to LazyInitializer this class could be named EagerInitializer because the object must already exist.

      Attachments

        1. lang-653.patch
          10 kB
          Oliver Heger

        Activity

          People

            Unassigned Unassigned
            oheger Oliver Heger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: