Class InterruptionChecker
- java.lang.Object
-
- io.github.lukehutch.fastclasspathscanner.utils.InterruptionChecker
-
public class InterruptionChecker extends Object
Check if this thread or any other thread that shares this InterruptionChecker instance has been interrupted or has thrown an exception.
-
-
Constructor Summary
Constructors Constructor Description InterruptionChecker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
check()
Check if this thread or any other thread that shares this InterruptionChecker instance has been interrupted or has thrown an exception, and if so, throw InterruptedException.boolean
checkAndReturn()
Check if this thread or any other thread that shares this InterruptionChecker instance has been interrupted or has thrown an exception, and if so, return true, else return false.ExecutionException
executionException(Exception e)
Stop all threads that share this InterruptionChecker due to an exception being thrown in one of them.void
interrupt()
Interrupt all threads that share this InterruptionChecker.
-
-
-
Method Detail
-
interrupt
public void interrupt()
Interrupt all threads that share this InterruptionChecker.
-
checkAndReturn
public boolean checkAndReturn()
Check if this thread or any other thread that shares this InterruptionChecker instance has been interrupted or has thrown an exception, and if so, return true, else return false.
-
check
public void check() throws InterruptedException, ExecutionException
Check if this thread or any other thread that shares this InterruptionChecker instance has been interrupted or has thrown an exception, and if so, throw InterruptedException.
-
executionException
public ExecutionException executionException(Exception e)
Stop all threads that share this InterruptionChecker due to an exception being thrown in one of them.
-
-