O'Reilly logo

Hands-On High Performance with Spring 5 by Dinesh Radadiya, Prashant Goswami, Pritesh Shah, Subhash Shah, Chintan Mehta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Executors

Executor provides an abstraction layer over all the internal thread management tasks and manages the entire concurrent execution flow of the threads. An Executor is an object that executes tasks provided.

The Java concurrency API provides the following three basic interfaces for executors:

  • Executor: This is a simple interface that is used to launch a new task. It does not strictly require the execution to be asynchronous.
  • ExecutorService: This is a subinterface of the Executor interface. It allows us to pass a task to be executed by a thread asynchronously. It provides methods to manage the termination of previously sublimed tasks through shutdown(), shutdownNow(), and awaitTermination(long timeout, TimeUnit unit). It also provides ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required