Class CurrentThreadExecutorService

java.lang.Object
java.util.concurrent.AbstractExecutorService
edu.umd.cs.findbugs.CurrentThreadExecutorService
All Implemented Interfaces:
AutoCloseable, Executor, ExecutorService

@NotThreadSafe class CurrentThreadExecutorService extends AbstractExecutorService

An ExecutorService implementation that runs command in the current thread. Instance of this class is not thread safe, do not share it among multiple threads. SpotBugs uses this class to keep backward compatibility (SpotBugs 3.1 run analysis on the main/current thread).

Since:
4.0
  • Field Details

    • LOG

      private static final org.slf4j.Logger LOG
    • isShutdown

      private boolean isShutdown
  • Constructor Details

    • CurrentThreadExecutorService

      CurrentThreadExecutorService()
  • Method Details

    • 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)
    • execute

      public void execute(Runnable command)