com.hammurapi.common.concurrent

## Class CallerThreadExecutorService

- java.lang.Object
- - java.util.concurrent.AbstractExecutorService
  - - com.hammurapi.common.concurrent.CallerThreadExecutorService

- All Implemented Interfaces:
    Executor, ExecutorService

      public class CallerThreadExecutorService
      extends AbstractExecutorService

  Executes all tasks in the current thread. This executor service can be used in situations when inherently asynchronous class shall operate in synchronous mode.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static ExecutorService` | `INSTANCE`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `awaitTermination(long timeout, TimeUnit unit)`
    `void` | `execute(Runnable command)`
    `boolean` | `isShutdown()`
    `boolean` | `isTerminated()`
    `void` | `shutdown()`
    `List<Runnable>` | `shutdownNow()`

    - ### Methods inherited from class java.util.concurrent.AbstractExecutorService

      `invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### INSTANCE

          public static final ExecutorService INSTANCE

  - ### Method Detail

    - #### shutdown

          public void shutdown()

    - #### shutdownNow

          public List<Runnable> shutdownNow()

    - #### isShutdown

          public boolean isShutdown()

    - #### isTerminated

          public boolean isTerminated()

    - #### awaitTermination

          public boolean awaitTermination(long timeout,
                                 TimeUnit unit)
                                   throws InterruptedException

      Throws:
        `InterruptedException`

    - #### execute

          public void execute(Runnable command)