-
Recent Articles
-
Categories
- algorithms (2)
- c++ (2)
- coding (9)
- enterprise edition (4)
- java (7)
- operating systems (4)
- snippets (4)
- standard edition (3)
- unix (4)
-
Tags
access autowiring cache counting sort database dependency injection design pattern ehcache engine example fast field filesystem full-text fusermount generic gzip implementation inversion of control jdbc linux lucene memcached mounting multitail orm password positioning sorting private quicksort radix sort regexp rsa scalability search singleton sorting spring ioc sql ssh sshfs tail tar tarball xml -
Advertisements
Tag Archives: singleton
[Java] The fastest singleton
Everybody know how to write thread-safe singleton. Consider standard approach: public class Singleton { private static Singleton instance; private Singleton() {} public static synchronized Singleton getInstance() { if(instance == null) { instance = new Singleton(); } return instance; } } … Continue reading
Posted in coding, java, standard edition Tagged design pattern, fast, implementation, singleton 5 Comments