ehcache

net.sf.ehcache.constructs.nonstop
Class NonstopExecutorServiceImpl

java.lang.Object
  extended by 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

Constructor Summary
NonstopExecutorServiceImpl(ThreadFactory threadFactory)
          Constructor accepting a ThreadFactory that will be used to create threads for the pool
 
Method Summary
<V> V
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
 

Constructor Detail

NonstopExecutorServiceImpl

public NonstopExecutorServiceImpl(ThreadFactory threadFactory)
Constructor accepting a ThreadFactory that will be used to create threads for the pool

Parameters:
threadFactory -
Method Detail

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

ehcache

true