Package io.dropwizard.lifecycle
Class ExecutorServiceManager
- java.lang.Object
-
- io.dropwizard.lifecycle.ExecutorServiceManager
-
-
Constructor Summary
Constructors Constructor Description ExecutorServiceManager(ExecutorService executor, Duration shutdownPeriod, String poolName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExecutorService
getExecutor()
String
getPoolName()
Duration
getShutdownPeriod()
void
stop()
Stops the object.String
toString()
-
-
-
Constructor Detail
-
ExecutorServiceManager
public ExecutorServiceManager(ExecutorService executor, Duration shutdownPeriod, String poolName)
-
-
Method Detail
-
stop
public void stop() throws InterruptedException, Exception
Stops the object. Called after the application is no longer accepting requests. The default implementation is a no-op- Specified by:
stop
in interfaceManaged
- Throws:
InterruptedException
- This is thrown if the thread executing this method is interrupted while awaiting executor tasks to complete.Exception
- if something goes wrong.
-
getExecutor
public ExecutorService getExecutor()
-
getShutdownPeriod
public Duration getShutdownPeriod()
-
getPoolName
public String getPoolName()
-
-