public class NonstopExecutorServiceImpl extends java.lang.Object implements NonstopExecutorService
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
EOL |
private static org.slf4j.Logger |
LOGGER |
private NonstopThreadPool |
nonstopThreadPool |
PRINT_STACK_TRACE_ON_EXCEPTION_PROPERTY
Constructor and Description |
---|
NonstopExecutorServiceImpl(java.util.concurrent.ThreadFactory threadFactory)
Constructor accepting a
ThreadFactory that will be used to create threads for the pool |
Modifier and Type | Method and Description |
---|---|
<V> V |
execute(java.util.concurrent.Callable<V> callable,
long timeoutValueInMillis)
Execute a
Callable task with timeout. |
private java.lang.Throwable |
getRootCause(java.lang.Throwable exception) |
private void |
printNonstopThreadStackTrace(java.util.concurrent.Callable callable,
long timeoutValueInMillis) |
void |
shutdown()
Shut down this executor service
|
private static final org.slf4j.Logger LOGGER
private static final java.lang.String EOL
private final NonstopThreadPool nonstopThreadPool
public NonstopExecutorServiceImpl(java.util.concurrent.ThreadFactory threadFactory)
ThreadFactory
that will be used to create threads for the poolthreadFactory
- public <V> V execute(java.util.concurrent.Callable<V> callable, long timeoutValueInMillis) throws java.util.concurrent.TimeoutException, CacheException, java.lang.InterruptedException
Callable
task with timeout. If the task does not complete within the timeout specified, throws a
TimeoutException
execute
in interface NonstopExecutorService
java.util.concurrent.TimeoutException
CacheException
java.lang.InterruptedException
private void printNonstopThreadStackTrace(java.util.concurrent.Callable callable, long timeoutValueInMillis)
private java.lang.Throwable getRootCause(java.lang.Throwable exception)
public void shutdown()
shutdown
in interface NonstopExecutorService