SameThreadExecutorService (Lucene 10.5.0 core API)
Description: declaration: package: org.apache.lucene.util, class: SameThreadExecutorService

Package org.apache.lucene.util

# Class SameThreadExecutorService

java.lang.Object
java.util.concurrent.AbstractExecutorService
org.apache.lucene.util.SameThreadExecutorService

All Implemented Interfaces:
  `AutoCloseable`, `Executor`, `ExecutorService`

public final class SameThreadExecutorService extends AbstractExecutorService
An `ExecutorService` that executes tasks immediately in the calling thread during submit.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SameThreadExecutorService()`

- ## Method Summary

  Modifier and Type
  Method
  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`

  ### Methods inherited from interface java.util.concurrent.ExecutorService

  `close`

- ## Constructor Details

  - ### SameThreadExecutorService

    public SameThreadExecutorService()

- ## Method Details

  - ### execute

    public void execute(Runnable command)

  - ### shutdownNow

    public List<Runnable> shutdownNow()

  - ### shutdown

    public void shutdown()

  - ### isTerminated

    public boolean isTerminated()

  - ### isShutdown

    public boolean isShutdown()

  - ### awaitTermination

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