public class CommandThreadManager extends Object implements AutoCloseable
ListeningExecutorService
, providing an
AutoCloseable
interface which waits for and kills the threads on close.Constructor and Description |
---|
CommandThreadManager(String name,
ConcurrencyLimit concurrencyLimit) |
CommandThreadManager(String name,
ConcurrencyLimit concurrencyLimit,
long shutdownTimeout,
TimeUnit shutdownTimeoutUnit) |
CommandThreadManager(String name,
ListeningMultiSemaphore semaphore,
ResourceAmounts defaultAmounts,
int managedThreadCount) |
CommandThreadManager(String name,
ListeningMultiSemaphore semaphore,
ResourceAmounts defaultAmounts,
int managedThreadCount,
long shutdownTimeout,
TimeUnit shutdownTimeoutUnit) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
ExecutorService |
getExecutorService() |
com.google.common.util.concurrent.ListeningExecutorService |
getListeningExecutorService() |
WeightedListeningExecutorService |
getWeightedListeningExecutorService() |
public CommandThreadManager(String name, ListeningMultiSemaphore semaphore, ResourceAmounts defaultAmounts, int managedThreadCount, long shutdownTimeout, TimeUnit shutdownTimeoutUnit)
public CommandThreadManager(String name, ListeningMultiSemaphore semaphore, ResourceAmounts defaultAmounts, int managedThreadCount)
public CommandThreadManager(String name, ConcurrencyLimit concurrencyLimit, long shutdownTimeout, TimeUnit shutdownTimeoutUnit)
public CommandThreadManager(String name, ConcurrencyLimit concurrencyLimit)
public ExecutorService getExecutorService()
public com.google.common.util.concurrent.ListeningExecutorService getListeningExecutorService()
public WeightedListeningExecutorService getWeightedListeningExecutorService()
public void close() throws InterruptedException
close
in interface AutoCloseable
InterruptedException