Package org.gbif.utils.concurrent
Class ExecutorUtils
java.lang.Object
org.gbif.utils.concurrent.ExecutorUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstop(ExecutorService exec) Shuts down an executor and waits up to 1 hour for the already submitted jobs to finish.static voidstop(ExecutorService exec, int timeout, TimeUnit unit) Shuts down an executor and waits for the job to finish until the given timeout is reached before forcing an immediate shutdown.
-
Constructor Details
-
ExecutorUtils
public ExecutorUtils()
-
-
Method Details
-
stop
Shuts down an executor and waits up to 1 hour for the already submitted jobs to finish.- Parameters:
exec-
-
stop
Shuts down an executor and waits for the job to finish until the given timeout is reached before forcing an immediate shutdown.- Parameters:
exec-timeout-unit-
-