mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-13 18:15:41 +00:00
add some references to class comments
This commit is contained in:
1 parent
dbc1ca7aeb
commit
c06c05757e
2 files changed
+11
No files matched your search
@@ -3,6 +3,13 @@ package com.iluwatar;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* The Initialize-on-demand-holder idiom is a secure way of
|
||||||
|
* creating lazy initialize singleton Object in Java.
|
||||||
|
* refer to "The CERT Oracle Secure Coding Standard for Java"
|
||||||
|
* By Dhruv Mohindra, Robert C. Seacord p.378
|
||||||
|
*
|
||||||
|
* Singleton objects usually are heavy to create and sometimes need to serialize them.
|
||||||
|
* This class also shows how to preserve singleton in Serialized version of singleton.
|
||||||
*
|
*
|
||||||
* @author mortezaadi@gmail.com
|
* @author mortezaadi@gmail.com
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
package com.iluwatar;
|
package com.iluwatar;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Double check locking
|
||||||
|
*
|
||||||
|
* http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html
|
||||||
|
*
|
||||||
* Broken under Java 1.4.
|
* Broken under Java 1.4.
|
||||||
* @author mortezaadi@gmail.com
|
* @author mortezaadi@gmail.com
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in new issue
Block a user