About 215,000 results
Open links in new tab
  1. C++ templated class implementation of the multiton pattern

    Aug 21, 2014 · I implemented the multiton pattern using a templated class in C++. #ifndef MULTITON_H #define MULTITON_H #include <map> template <typename Key, typename T> …

  2. java - Singleton Pattern: Multiton? - Stack Overflow

    Aug 23, 2014 · The Multiton design pattern is an extension of the singleton pattern. It ensures that a limited number of instances of a class can exist by specifying a key for each instance and …

  3. multithreading - Thread safe multitons in Java - Stack Overflow

    May 23, 2017 · ORIGINAL ANSWER This is a solution which builds on the Memoizer pattern as described in JCiP. It uses a ConcurrentHashMap like one of the other answers, but instead of …

  4. java - Multiton - real world example? - Stack Overflow

    Dec 19, 2014 · I'm currently reviewing design patterns. I came across this one Multiton, but I find it difficult to think of a good real-worlds usage example. So what's the main field of application …

  5. rust - How to implement a Multiton pattern with user-supplied …

    May 30, 2025 · 0 I’m building a Rust library that manages multiton instances keyed by strings. Users of the library provide factory methods to create instances implementing a trait, and the …

  6. java - Thread-safe multiton pattern - Stack Overflow

    Aug 15, 2013 · Inspired by a comment to an given answer I tried to create a thread-safe implementation of the multiton pattern, which relies on unique keys and performs locks on …

  7. How to create a class that doesn't re-create an object with …

    Sep 21, 2011 · How does this work when MyObject has multiple arguments? For two arguments this gives TypeError: multiton.<locals>.getinstance() takes 1 positional argument but 2 were …

  8. Is this a lazy thread safe Generic multiton? - Stack Overflow

    May 23, 2013 · I was thinking , isn't this a more accuarate implementation of a thread safe Multiton, based on Jon Skeet's original lazy thread safe singleton?. To be fully lazy, the static …

  9. Using enum to implement multitons in Java - Stack Overflow

    Sep 18, 2014 · One alternative I considered was having a standard enum and then a separate class that maps the enum to an implementation of the interface (using the standard multiton …

  10. How to implement multiton pattern using Spring Framework

    Mar 28, 2021 · How to implement multiton pattern using Spring Framework Asked 3 years, 11 months ago Modified 3 years, 11 months ago Viewed 346 times