Concurrency/Multithreading

(Simple) Thread and Runnable

Identify potential threading problems among deadlock, starvation, livelock, and race conditions
Use synchronized keyword and java.util.concurrent.atomic package to control the order of thread execution
Use java.util.concurrent collections and classes including CyclicBarrier and CopyOnWriteArrayList
Use parallel Fork/Join Framework
Use parallel Streams including reduction, decomposition, merging processes, pipelines and performance.

java.util.concurrent – Concurrent Collections

CopyOnWriteArrayList
CopyOnWriteArraySet
ConcurrentMap
ConcurrentHashMap
ConcurrentNavigableMap
ConcurrentSkipListMap
ConcurrentSkipListSet

java.util.concurrent – Queues

Non-Blocking ConcurrentLinkedQueue
Non-Blocking ConcurrentLinkedDeque
Blocking BlockingQueue
Blocking ArrayBlockingQueue
Blocking DelayQueue
Blocking LinkedBlockingQueue
Blocking PriorityBlockingQueue
Blocking SynchronousQueue
Blocking BlockingDeque
Blocking LinkedBlockingDeque
Blocking TransferQueue
Blocking LinkedTransferQueue

java.util.concurrent – Synchronizers

Semaphore
CountDownLatch
CyclicBarrier
Exchanger
Phaser

https://habr.com/post/277669/

java.util.concurrent – Executors

Future
RunnableFuture
Callable
FutureTask
Delayed
ScheduledFuture
RunnableScheduledFuture
Executor
ExecutorService
ScheduledExecutorService
AbstractExecutorService
Executors
ThreadPoolExecutor
ScheduledThreadPoolExecutor
ThreadFactory
RejectedExecutionHandler
ForkJoinPool
ForkJoinTask
RecursiveTask
RecursiveAction
ForkJoinWorkerThread
CompletionService
ExecutorCompletionService

java.util.concurrent – Locks

Condition
Lock
ReentrantLock
ReadWriteLock
ReentrantReadWriteLock
ReentrantReadWriteLock.ReadLock
ReentrantReadWriteLock.WriteLock
LockSupport
AbstractOwnableSynchronizer
AbstractQueuedSynchronizer
AbstractQueuedLongSynchronizer

java.util.concurrent – Atomics

AtomicBoolean, AtomicInteger, AtomicLong, AtomicIntegerArray, AtomicLongArray
AtomicReference
AtomicMarkableReference
AtomicStampedReference
AtomicReferenceArray
AtomicIntegerFieldUpdater, AtomicLongFieldUpdater, AtomicReferenceFieldUpdater

Leave a comment

Your email address will not be published. Required fields are marked *