Chapter 18Concurrency

OCP EXAM OBJECTIVES COVERED IN THIS CHAPTER:

  • Concurrency
    • Create worker threads using Runnable, Callable and use an ExecutorService to concurrently execute tasks
    • Use java.util.concurrent collections and classes including CyclicBarrier and CopyOnWriteArrayList
    • Write thread‐safe code
    • Identify threading problems such as deadlocks and livelocks
  • Parallel Streams
    • Develop code that uses parallel streams
    • Implement decomposition and reduction with streams

As you will learn in Chapter 19, “I/O,” Chapter 20 “NIO.2,” and Chapter 21, “JDBC,” computers are capable of reading and writing data to external resources. Unfortunately, as compared to CPU operations, these disk/network operations tend to be extremely slow—so slow, ...

Get OCP Oracle Certified Professional Java SE 11 Developer Complete Study Guide now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.