Class CurrentThreadExecutorService
java.lang.Object
java.util.concurrent.AbstractExecutorService
edu.umd.cs.findbugs.CurrentThreadExecutorService
- All Implemented Interfaces:
AutoCloseable, Executor, ExecutorService
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 Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate static final org.slf4j.Logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long timeout, TimeUnit unit) voidbooleanbooleanvoidshutdown()Methods inherited from class AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submitMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ExecutorService
close
-
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
-
isShutdown
public boolean isShutdown() -
isTerminated
public boolean isTerminated() -
awaitTermination
-
execute
-