Thread-safe singleton implementation in Java

Publicado em: 13 Outubro 2014
no canal de: Java Web Development
13,026
133

Making the constructor private and using a static getter method only, your singleton object will not be able to survive in multi-thread or multi CPU environment. We will look for a soluton to singleton usage problem in multithread environment. First attempt will be double-locking mechanism, then we will use volatile keyword to complete the task.
This is a production of www.javathlon.com.

Happy learning.


Nesta página do site você pode assistir ao vídeo on-line Thread-safe singleton implementation in Java duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Java Web Development 13 Outubro 2014, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 13,026 vezes e gostou 133 espectadores. Boa visualização!