net.sf.ehcache.constructs.nonstop
Class NonstopExecutorServiceImpl
java.lang.Object
net.sf.ehcache.constructs.nonstop.NonstopExecutorServiceImpl
- All Implemented Interfaces:
- NonstopExecutorService
public class NonstopExecutorServiceImpl
- extends Object
- implements NonstopExecutorService
Class used by NonStopCache for executing tasks within a timeout limit.
- Author:
- Abhishek Sanoujam
Method Summary |
|
execute(Callable<V> callable,
long timeoutValueInMillis)
Execute a Callable task with timeout. |
void |
shutdown()
Shut down this executor service |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NonstopExecutorServiceImpl
public NonstopExecutorServiceImpl(ThreadFactory threadFactory)
- Constructor accepting a
ThreadFactory
that will be used to create threads for the pool
- Parameters:
threadFactory
-
execute
public <V> V execute(Callable<V> callable,
long timeoutValueInMillis)
throws TimeoutException,
CacheException,
InterruptedException
- Execute a
Callable
task with timeout. If the task does not complete within the timeout specified, throws a
TimeoutException
- Specified by:
execute
in interface NonstopExecutorService
- Returns:
- the return value from the callable
- Throws:
TimeoutException
CacheException
InterruptedException
shutdown
public void shutdown()
- Shut down this executor service
- Specified by:
shutdown
in interface NonstopExecutorService
Copyright © 2003-2014 Terracotta, Inc.. All Rights Reserved.