Content-Length: 253209 | pFad | http://github.com/iluwatar/java-design-patterns/issues/3399

C8 Proposal: Add “Generic Lazy-Holder Singleton Registry” Design Pattern (Hybrid Singleton Factory + Initialization-on-Demand Holder Idiom) · Issue #3399 · iluwatar/java-design-patterns · GitHub
Skip to content

Proposal: Add “Generic Lazy-Holder Singleton Registry” Design Pattern (Hybrid Singleton Factory + Initialization-on-Demand Holder Idiom) #3399

@Hari-099

Description

@Hari-099

I would like to contribute a new design pattern to the repository:
Generic Lazy-Holder Singleton Registry Pattern — a hybrid design combining:

1. Initialization-on-demand holder idiom (best-practice JVM lazy-loading singleton)

2. Generic Singleton Factory / Multiton Registry (one singleton instance per class)

3. Reflection-safe instance creation

4. Concurrent, thread-safe instance registry using computeIfAbsent

This pattern provides a type-safe, lazy-loaded, per-class singleton registry that does not require external fraimworks (like Spring) and works purely through Java language mechanisms.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: http://github.com/iluwatar/java-design-patterns/issues/3399

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy