|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compass.core.executor.DefaultExecutorManager
public class DefaultExecutorManager
The "default" implementation of an executor manager. Simply delegates operations
to an internal executor manager created based on CompassEnvironment.ExecutorManager
settings.
| Constructor Summary | |
|---|---|
DefaultExecutorManager()
|
|
| Method Summary | ||
|---|---|---|
void |
close()
Shuts down this executor manager. |
|
void |
configure(CompassSettings settings)
Configure using the given settings. |
|
|
invokeAll(Collection<Callable<T>> tasks)
|
|
|
invokeAllWithLimit(Collection<Callable<T>> tasks,
int concurrencyThreshold)
Similar to InternalExecutorManager.invokeAll(java.util.Collection), but only uses it if the number of tasks passes
the concurrent limit. |
|
|
invokeAllWithLimitBailOnException(Collection<Callable<T>> tasks,
int concurrencyThreshold)
|
|
|
schedule(Callable<V> callable,
long delay,
TimeUnit unit)
|
|
ScheduledFuture<?> |
scheduleAtFixedRate(Runnable command,
long initialDelay,
long period,
TimeUnit unit)
|
|
ScheduledFuture<?> |
scheduleWithFixedDelay(Runnable command,
long initialDelay,
long delay,
TimeUnit unit)
|
|
|
submit(Callable<T> task)
|
|
void |
submit(Runnable task)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultExecutorManager()
| Method Detail |
|---|
public void configure(CompassSettings settings)
throws CompassException
CompassConfigurable
configure in interface CompassConfigurablesettings - The settings for the configured object
CompassException
public <T> List<Future<T>> invokeAllWithLimitBailOnException(Collection<Callable<T>> tasks,
int concurrencyThreshold)
invokeAllWithLimitBailOnException in interface ExecutorManager
public <T> List<Future<T>> invokeAllWithLimit(Collection<Callable<T>> tasks,
int concurrencyThreshold)
ExecutorManagerInternalExecutorManager.invokeAll(java.util.Collection), but only uses it if the number of tasks passes
the concurrent limit. Also, will check if any callable has an exception and will propagate it.
invokeAllWithLimit in interface ExecutorManagerpublic void close()
InternalExecutorManager
close in interface InternalExecutorManagerpublic void submit(Runnable task)
submit in interface InternalExecutorManagerpublic <T> Future<T> submit(Callable<T> task)
submit in interface InternalExecutorManagerExecutorService.submit(java.util.concurrent.Callable)
public <T> List<Future<T>> invokeAll(Collection<Callable<T>> tasks)
throws InterruptedException
invokeAll in interface InternalExecutorManagerInterruptedExceptionExecutorService.invokeAll(java.util.Collection)
public <V> ScheduledFuture<V> schedule(Callable<V> callable,
long delay,
TimeUnit unit)
schedule in interface InternalExecutorManagerScheduledExecutorService.schedule(java.util.concurrent.Callable, long, java.util.concurrent.TimeUnit)
public ScheduledFuture<?> scheduleAtFixedRate(Runnable command,
long initialDelay,
long period,
TimeUnit unit)
scheduleAtFixedRate in interface InternalExecutorManagerScheduledExecutorService.scheduleAtFixedRate(Runnable, long, long, java.util.concurrent.TimeUnit)
public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command,
long initialDelay,
long delay,
TimeUnit unit)
scheduleWithFixedDelay in interface InternalExecutorManagerScheduledExecutorService.scheduleWithFixedDelay(Runnable, long, long, java.util.concurrent.TimeUnit)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||