約3,500件1ページ目

日本語のみで絞り込む

条件を指定して検索しています。すべての条件を解除する

  • 最終更新日:3か月以内
  • 2026/10/23 -It is simple and thread-safe, but may lead to unnecessary resource usage. Example: Static initializer based Java implementation of singleton design pattern. C++ ...

    2026/10/28 -In this tutorial, we'll first look at the singleton design pattern and its thread-safe implementation. Then, we'll look at the singleton bean scope in ...

    2026/10/28 -The example uses an AtomicInteger, a JDK counter that can be incremented safely when multiple threads call it. The numbers are local to this JVM and reset when ...

    Learn the Singleton Design Pattern in Java with 6 implementations, practical code examples, and their trade-offs. Understand lazy initialization ...

    YouTubeProgramming Tutorials

    2026/9/7 -To make the above approach thread-safe, the synchronized method is used inside the getInstance() method. When a thread enters the synchronized method, it locks ...

    2026/10/4 -Start with the singleton's scope and lifetime, then separate unique construction, safe publication, and safe operations on its state. Eager construction or the ...

    2026/10/15 -Choose the holder approach when you want a regular class with lazy, thread-safe initialization. Choose an enum when its type constraints fit and the built-in ...

    2026/10/13 -Thread safety is much more complex and can be compromised when using persistent scopes like singleton, session, server, application and cachebox, as more than ...

    2026/8/20 -Why does Double-Checked Locking in Singleton Design Pattern need volatile ... ConcurrentHashMap makes the map thread-safe, but it does not make the objects inside ...

    2026/10/20 -A singleton ensures that a class has only one instance and provides a global point of access to it.