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