Skip to content

Commit bd10b59

Browse files
committedJan 21, 2018
Fixed some typos
1 parent 4e1a16c commit bd10b59

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed
 

‎src/main/java/br/com/leonardoz/features/atomics/UsingAtomics.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* boolean indicating success or not. All atomic, only blocking briefly.
2121
*
2222
* Interesting classes in this package are: AtomicBoolean, AtomicLong,
23-
* AtomicReference<T>, AtomicMarkablereference<T> and
23+
* AtomicReference<T>, AtomicMarkableReference<T> and
2424
* AtomicReferenceFieldUpdater<T, V>.
2525
*
2626
*

‎src/main/java/br/com/leonardoz/features/collections/UsingConcurrentCollections.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class UsingConcurrentCollections {
3131
*
3232
* - size() and isEmpty() can be incorrect. Don't rely on them.
3333
*
34-
* - Supports atomic operations, doen't need client side locking.
34+
* - Supports atomic operations, don't need client side locking.
3535
*
3636
* - Readers can access concurrently, and iterator have weak consistency.
3737
*
@@ -129,7 +129,7 @@ public static void usingCopyOnWriteArrayList() {
129129
* Concurrent Queue interface.
130130
*
131131
* Implementations: LinkedBlockingQueue, ArrayBlockingQueue,
132-
* PriorirtBlockingQueue, SynchronizedQueue.
132+
* PriorityBlockingQueue, SynchronizedQueue.
133133
*
134134
* Used for the Producer-Consumer pattern.
135135
*

‎src/main/java/br/com/leonardoz/features/executors/UsingExecutors.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ public static void usingCachedThreadPool() {
6262
ExecutorService cachedThreadPool = Executors.newCachedThreadPool();
6363
List<Future<UUID>> uuids = new LinkedList<>();
6464
for (int i = 0; i < 10; i++) {
65-
Future<UUID> submited = cachedThreadPool.submit(() -> {
65+
Future<UUID> submitted = cachedThreadPool.submit(() -> {
6666
UUID randomUUID = UUID.randomUUID();
6767
System.out.println("UUID " + randomUUID + " from " + Thread.currentThread().getName());
6868
return randomUUID;
6969
});
70-
uuids.add(submited);
70+
uuids.add(submitted);
7171
}
7272
cachedThreadPool.execute(() -> uuids.forEach((f) -> {
7373
try {
@@ -91,12 +91,12 @@ public static void usingFixedThreadPool() {
9191
ExecutorService fixedPool = Executors.newFixedThreadPool(4);
9292
List<Future<UUID>> uuids = new LinkedList<>();
9393
for (int i = 0; i < 20; i++) {
94-
Future<UUID> submited = fixedPool.submit(() -> {
94+
Future<UUID> submitted = fixedPool.submit(() -> {
9595
UUID randomUUID = UUID.randomUUID();
9696
System.out.println("UUID " + randomUUID + " from " + Thread.currentThread().getName());
9797
return randomUUID;
9898
});
99-
uuids.add(submited);
99+
uuids.add(submitted);
100100
}
101101
fixedPool.execute(() -> uuids.forEach((f) -> {
102102
try {

‎src/main/java/br/com/leonardoz/features/futures/UsingCompletableFuture.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
*
131131
* CompletableFuture.join() // same as get
132132
*
133-
* CompletableFuture.getNow(valueIfAbsent) // immediatly return
133+
* CompletableFuture.getNow(valueIfAbsent) // immediately return
134134
*
135135
* CompletableFuture.completeExceptionally() // completes throwing a exception
136136
*

‎src/main/java/br/com/leonardoz/patterns/controlled_initialization/ControlledInitialization.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* speed up the process. And in order to proceed with the programming logic
1212
* flux, it's important to ensure that the initialization has been completed.
1313
*
14-
* Intent: Use CountDownLatche to crate a controlled concurrent initialization
14+
* Intent: Use CountDownLatch to crate a controlled concurrent initialization
1515
* mechanism.
1616
*
1717
* Applicability: When you have multiple expensive resources being initialized

0 commit comments

Comments
 (0)