Package lumis.portal.executor
Class ExecutorManager
- java.lang.Object
-
- lumis.portal.executor.ExecutorManager
-
- All Implemented Interfaces:
java.util.concurrent.Executor
,java.util.concurrent.ExecutorService
,java.util.concurrent.ScheduledExecutorService
,IExecutorManager
public class ExecutorManager extends java.lang.Object implements IExecutorManager
Support for background executions implementation.- Since:
- 4.1.0
- Version:
- $Revision$ $Date$
-
-
Constructor Summary
Constructors Constructor Description ExecutorManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
awaitTermination(long timeout, java.util.concurrent.TimeUnit unit)
void
execute(java.lang.Runnable command)
java.util.List
invokeAll(java.util.Collection tasks)
java.util.List
invokeAll(java.util.Collection tasks, long timeout, java.util.concurrent.TimeUnit unit)
java.lang.Object
invokeAny(java.util.Collection tasks)
java.lang.Object
invokeAny(java.util.Collection tasks, long timeout, java.util.concurrent.TimeUnit unit)
boolean
isShutdown()
boolean
isTerminated()
java.util.concurrent.ScheduledFuture<?>
schedule(java.lang.Runnable command, long delay, java.util.concurrent.TimeUnit unit)
<V> java.util.concurrent.ScheduledFuture<V>
schedule(java.util.concurrent.Callable<V> callable, long delay, java.util.concurrent.TimeUnit unit)
java.util.concurrent.ScheduledFuture<?>
scheduleAtFixedRate(java.lang.Runnable command, long initialDelay, long period, java.util.concurrent.TimeUnit unit)
java.util.concurrent.ScheduledFuture<?>
scheduleWithFixedDelay(java.lang.Runnable command, long initialDelay, long delay, java.util.concurrent.TimeUnit unit)
void
shutdown()
java.util.List<java.lang.Runnable>
shutdownNow()
java.util.concurrent.Future<?>
submit(java.lang.Runnable task)
<T> java.util.concurrent.Future<T>
submit(java.lang.Runnable task, T result)
<T> java.util.concurrent.Future<T>
submit(java.util.concurrent.Callable<T> task)
-
-
-
Method Detail
-
awaitTermination
public boolean awaitTermination(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
- Specified by:
awaitTermination
in interfacejava.util.concurrent.ExecutorService
- Throws:
java.lang.InterruptedException
-
execute
public void execute(java.lang.Runnable command)
- Specified by:
execute
in interfacejava.util.concurrent.Executor
-
invokeAll
public java.util.List invokeAll(java.util.Collection tasks, long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
- Specified by:
invokeAll
in interfacejava.util.concurrent.ExecutorService
- Throws:
java.lang.InterruptedException
-
invokeAll
public java.util.List invokeAll(java.util.Collection tasks) throws java.lang.InterruptedException
- Specified by:
invokeAll
in interfacejava.util.concurrent.ExecutorService
- Throws:
java.lang.InterruptedException
-
invokeAny
public java.lang.Object invokeAny(java.util.Collection tasks, long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
- Specified by:
invokeAny
in interfacejava.util.concurrent.ExecutorService
- Throws:
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException
-
invokeAny
public java.lang.Object invokeAny(java.util.Collection tasks) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
- Specified by:
invokeAny
in interfacejava.util.concurrent.ExecutorService
- Throws:
java.lang.InterruptedException
java.util.concurrent.ExecutionException
-
isShutdown
public boolean isShutdown()
- Specified by:
isShutdown
in interfacejava.util.concurrent.ExecutorService
-
isTerminated
public boolean isTerminated()
- Specified by:
isTerminated
in interfacejava.util.concurrent.ExecutorService
-
schedule
public <V> java.util.concurrent.ScheduledFuture<V> schedule(java.util.concurrent.Callable<V> callable, long delay, java.util.concurrent.TimeUnit unit)
- Specified by:
schedule
in interfacejava.util.concurrent.ScheduledExecutorService
-
schedule
public java.util.concurrent.ScheduledFuture<?> schedule(java.lang.Runnable command, long delay, java.util.concurrent.TimeUnit unit)
- Specified by:
schedule
in interfacejava.util.concurrent.ScheduledExecutorService
-
scheduleAtFixedRate
public java.util.concurrent.ScheduledFuture<?> scheduleAtFixedRate(java.lang.Runnable command, long initialDelay, long period, java.util.concurrent.TimeUnit unit)
- Specified by:
scheduleAtFixedRate
in interfacejava.util.concurrent.ScheduledExecutorService
-
scheduleWithFixedDelay
public java.util.concurrent.ScheduledFuture<?> scheduleWithFixedDelay(java.lang.Runnable command, long initialDelay, long delay, java.util.concurrent.TimeUnit unit)
- Specified by:
scheduleWithFixedDelay
in interfacejava.util.concurrent.ScheduledExecutorService
-
shutdown
public void shutdown()
- Specified by:
shutdown
in interfacejava.util.concurrent.ExecutorService
-
shutdownNow
public java.util.List<java.lang.Runnable> shutdownNow()
- Specified by:
shutdownNow
in interfacejava.util.concurrent.ExecutorService
-
submit
public <T> java.util.concurrent.Future<T> submit(java.util.concurrent.Callable<T> task)
- Specified by:
submit
in interfacejava.util.concurrent.ExecutorService
-
submit
public <T> java.util.concurrent.Future<T> submit(java.lang.Runnable task, T result)
- Specified by:
submit
in interfacejava.util.concurrent.ExecutorService
-
submit
public java.util.concurrent.Future<?> submit(java.lang.Runnable task)
- Specified by:
submit
in interfacejava.util.concurrent.ExecutorService
-
-