Skip to content

Commit b65b85e

Browse files
committed
Went back and optimized the JavaDoc for all the packages up till the 8th one (breaks, italics, class/package references ..etc), so it looks prettier when integrated to the IDE.
1 parent b531a8a commit b65b85e

File tree

12 files changed

+91
-77
lines changed

12 files changed

+91
-77
lines changed

JavaMultiThreadingCodes/src/CountDownLatch_6/App.java

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,34 @@
55
import java.util.concurrent.Executors;
66

77
/**
8-
* CountDownLatch Java class to synchronize your threads’ activities.
9-
*
8+
* {@link java.util.concurrent.CountDownLatch} Java class to synchronize your threads’ activities.
9+
* <br><br>
1010
* Source:
11-
* (http://stackoverflow.com/questions/17827022/what-is-countdown-latch-in-java-multithreading)
11+
* <em>http://stackoverflow.com/questions/17827022/what-is-countdown-latch-in-java-multithreading</em><br>
12+
*
1213
* Any thread, usually main thread of application, which calls
13-
* CountDownLatch.await() will wait until count reaches zero or its interrupted
14+
* {@link java.util.concurrent.CountDownLatch#await()} will wait until count reaches zero or its interrupted
1415
* by another thread. All other thread are required to do count down by calling
15-
* CountDownLatch.countDown() once they are completed or ready.
16-
*
16+
* {@link java.util.concurrent.CountDownLatch#countDown()} once they are completed or ready.
17+
* <br>
1718
* As soon as count reaches zero, Thread awaiting starts running. One of the
18-
* disadvantage of CountDownLatch is that its not reusable once count reaches to
19-
* zero you can not use CountDownLatch any more.
20-
*
21-
* Use CountDownLatch when one thread like main thread, require to wait for one
22-
* or more thread to complete, before it can start processing.
23-
*
24-
* Classical example of using CountDownLatch in Java is any server side core
25-
* Java application which uses services architecture, where multiple services
19+
* disadvantage of {@link java.util.concurrent.CountDownLatch} is that it's
20+
* not reusable once the count reaches to
21+
* zero you can not use {@link java.util.concurrent.CountDownLatch} any more.
22+
* <br><br>
23+
* Use {@link java.util.concurrent.CountDownLatch} when one thread, like main
24+
* thread, require to wait for one or more threads to complete, before it can
25+
* start processing.
26+
* <br><br>
27+
* Classical example of using {@link java.util.concurrent.CountDownLatch} in
28+
* Java is any server side core Java application which uses services
29+
* architecture, where multiple services
2630
* are provided by multiple threads and application can not start processing
2731
* until all services have started successfully.
28-
*
29-
* Codes with minor comments are from http://www.caveofprogramming.com/youtube/
32+
* <br><br>
33+
* Codes with minor comments are from <em>http://www.caveofprogramming.com/youtube/</em><br>
3034
* also freely available at
31-
* https://www.udemy.com/java-multithreading/?couponCode=FREE
35+
* <em>https://www.udemy.com/java-multithreading/?couponCode=FREE</em>
3236
*
3337
* @author Z.B. Celik <[email protected]>
3438
*/

JavaMultiThreadingCodes/src/JoiningAndSynchronizeThreads_3/Worker.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
import java.util.logging.Logger;
55

66
/**
7-
* synchronized ("only let one thread in here at a time".) and join ("wait until
7+
* {@code synchronized} ("only let one thread in here at a time".) and {@code join} ("wait until
88
* thread on which join has called finished") keyword.
9-
*
10-
* Codes with minor comments are from http://www.caveofprogramming.com/youtube/
9+
* <br><br>
10+
* Codes with minor comments are from <em>http://www.caveofprogramming.com/youtube/</em><br>
1111
* also freely available at
12-
* https://www.udemy.com/java-multithreading/?couponCode=FREE
12+
* <em>https://www.udemy.com/java-multithreading/?couponCode=FREE</em>
1313
*
1414
* @author Z.B. Celik <[email protected]>
1515
*/

JavaMultiThreadingCodes/src/LockObjects_4/App.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package LockObjects_4;
22

33
/**
4-
* Codes with minor comments are from http://www.caveofprogramming.com/youtube/
4+
* Codes with minor comments are from <em>http://www.caveofprogramming.com/youtube/</em><br>
55
* also freely available at
6-
* https://www.udemy.com/java-multithreading/?couponCode=FREE
6+
* <em>https://www.udemy.com/java-multithreading/?couponCode=FREE</em>
77
*
88
* @author Z.B. Celik <[email protected]>
99
*/

JavaMultiThreadingCodes/src/ProducerConsumer_7/App.java

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
package ProducerConsumer_7;
22

33
/**
4-
* producer-consumer pattern in Java using the ArrayBlockingQueue Java class.
4+
* Producer-Consumer pattern in Java using the {@link java.util.concurrent
5+
* .ArrayBlockingQueue} Java class.
6+
* <br><br>
57
* Producer-Consumer is the situation where one or more threads are producing
68
* data items and adding them to a shared data store of some kind while one or
79
* more other threads process those items, removing them from the data store.
8-
*
9-
* Codes with minor comments are from http://www.caveofprogramming.com/youtube/
10+
* <br><br>
11+
* Codes with minor comments are from <em>http://www.caveofprogramming.com/youtube/</em><br>
1012
* also freely available at
11-
* https://www.udemy.com/java-multithreading/?couponCode=FREE
13+
* <em>https://www.udemy.com/java-multithreading/?couponCode=FREE</em>
1214
*
1315
* @author Z.B. Celik <[email protected]>
1416
*/
@@ -19,14 +21,16 @@
1921
public class App {
2022

2123
/**
22-
* Thread safe implementation of Queue data structure so you do not need to
23-
* worry about synchronization. More specifically BlockingQueue
24+
* Thread safe implementation of {@link java.util.Queue} data structure so
25+
* you do not need to worry about synchronization.
26+
* More specifically {@link java.util.concurrent.BlockingQueue}
2427
* implementations are thread-safe. All queuing methods are atomic in nature
2528
* and use internal locks or other forms of concurrency control. If
2629
* BlockingQueue is not used queue is shared data structure either
27-
* sychronized or wait() notify() (see Course 8) should be used. Java 1.5
28-
* introduced a new concurrency library (in the java.util.concurrent
29-
* package) which was designed to provide a higher level abstraction over
30+
* {@code synchronized} or {@code wait() notify()} (see Course 8) should be
31+
* used.
32+
* Java 1.5 introduced a new concurrency library {@link java.util.concurrent}
33+
* which was designed to provide a higher level abstraction over
3034
* the wait/notify mechanism.
3135
*/
3236
private static BlockingQueue<Integer> queue = new ArrayBlockingQueue<>(10);

JavaMultiThreadingCodes/src/StartingThreads_1/ApplicationAnonymous.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
/**
44
* Starting threads using the Thread constructor with anonymous classes
5-
*
6-
* Codes with minor comments are from http://www.caveofprogramming.com/youtube/
5+
* <br><br>
6+
* Codes with minor comments are from <em>http://www.caveofprogramming.com/youtube/</em><br>
77
* also freely available at
8-
* https://www.udemy.com/java-multithreading/?couponCode=FREE
8+
* <em>https://www.udemy.com/java-multithreading/?couponCode=FREE</em>
99
*
1010
* @author Z.B. Celik <[email protected]>
1111
*/

JavaMultiThreadingCodes/src/StartingThreads_1/ApplicationExtends.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22

33
/**
44
* Starting Threads with extends
5-
*
6-
* Codes with minor comments are from
7-
* http://www.caveofprogramming.com/youtube/ also freely available at
8-
* https://www.udemy.com/java-multithreading/?couponCode=FREE
5+
* <br><br>
6+
* Codes with minor comments are from <em>http://www.caveofprogramming.com/youtube/</em><br>
7+
* also freely available at <em>https://www.udemy.com/java-multithreading/?couponCode=FREE</em>
98
*
109
* @author Z.B. Celik <[email protected]>
1110
*/

JavaMultiThreadingCodes/src/StartingThreads_1/ApplicationRunnable.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22

33
/**
44
* Starting Threads using Runnable Interface
5-
*
6-
* Codes with minor comments are from http://www.caveofprogramming.com/youtube/
7-
* also freely available at
8-
* https://www.udemy.com/java-multithreading/?couponCode=FREE
5+
* <br><br>
6+
* Codes with minor comments are from <em>http://www.caveofprogramming.com/youtube/</em><br>
7+
* also freely available at: <em>https://www.udemy.com/java-multithreading/?couponCode=FREE</em>
98
*
109
* @author Z.B. Celik <[email protected]>
1110
*/

JavaMultiThreadingCodes/src/ThreadPools_5/App.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
/**
44
* ThreadPool ("number of workers in a factory")
5-
*
6-
* Codes with minor comments are from http://www.caveofprogramming.com/youtube/
5+
* <br><br>
6+
* Codes with minor comments are from <em>http://www.caveofprogramming.com/youtube/</em><br>
77
* also freely available at
8-
* https://www.udemy.com/java-multithreading/?couponCode=FREE
8+
* <em>https://www.udemy.com/java-multithreading/?couponCode=FREE</em>
99
*
1010
* @author Z.B. Celik <[email protected]>
1111
*/

JavaMultiThreadingCodes/src/ThreadPools_5/WorkerThreadPool.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
import java.util.concurrent.TimeUnit;
99

1010
/**
11-
* This is the implementation of LockObjects_4.Worker with threadPool
12-
*
13-
* Codes with minor comments are from http://www.caveofprogramming.com/youtube/
11+
* This is the implementation of {@link LockObjects_4.Worker} with threadPool
12+
* <br><br>
13+
* Codes with minor comments are from <em>http://www.caveofprogramming.com/youtube/</em><br>
1414
* also freely available at
15-
* https://www.udemy.com/java-multithreading/?couponCode=FREE
15+
* <em>https://www.udemy.com/java-multithreading/?couponCode=FREE</em>
1616
*
1717
* @author Z.B. Celik <[email protected]>
1818
*/

JavaMultiThreadingCodes/src/VolatileKeyword_2/App.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
package VolatileKeyword_2;
22

33
/**
4-
* Volatile Keyword, “… the volatile modifier guarantees that any thread that
5-
* reads a field will see the most recently written value.” - Josh Bloch
6-
*
7-
* Codes with minor comments are from http://www.caveofprogramming.com/youtube/
4+
* Volatile Keyword, <em>“… the volatile modifier guarantees that any thread that
5+
* reads a field will see the most recently written value.”</em> - Josh Bloch
6+
* <br><br>
7+
* Codes with minor comments are from <em>http://www.caveofprogramming.com/youtube/</em><br>
88
* also freely available at
9-
* https://www.udemy.com/java-multithreading/?couponCode=FREE
9+
* <em>https://www.udemy.com/java-multithreading/?couponCode=FREE</em>
1010
*
1111
* @author Z.B. Celik <[email protected]>
1212
*/

0 commit comments

Comments
 (0)