public class AsyncExecutionService extends BasicService implements IExecutionService
EMPTY_SERVICES| Constructor and Description |
|---|
AsyncExecutionService(IServiceProvider provider)
Create a new asynchronous executor service.
|
AsyncExecutionService(IServiceProvider provider,
Map<String,Object> properties)
Create a new asynchronous executor service.
|
| Modifier and Type | Method and Description |
|---|---|
IFuture<Void> |
cancel(IExecutable task)
Cancel a task.
|
boolean |
customIsValid()
Test if the service is valid.
|
void |
execute(IExecutable task)
Execute a task in its own thread.
|
IFuture<Void> |
getNextIdleFuture()
Get the future indicating that executor is idle.
|
IExecutable[] |
getTasks()
Get the currently running or waiting tasks.
|
IFuture<Void> |
shutdownService()
Shutdown the executor service.
// todo: make callable more than once
|
IFuture<Void> |
startService()
Start the execution service.
|
createServiceIdentifier, createServiceIdentifier, equals, generateServiceName, getPropertyMap, getServiceIdentifier, isValid, setPropertyMapgetClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPropertyMap, getServiceIdentifier, isValidpublic AsyncExecutionService(IServiceProvider provider)
public AsyncExecutionService(IServiceProvider provider, Map<String,Object> properties)
public void execute(IExecutable task)
execute in interface IExecutionServicetask - The task to execute.
(called from arbitrary threads)public IFuture<Void> cancel(IExecutable task)
cancel in interface IExecutionServicetask - The task to execute.listener - The listener.public IExecutable[] getTasks()
getTasks in interface IExecutionServicepublic IFuture<Void> startService()
startService in interface IInternalServicestartService in class BasicServicepublic IFuture<Void> shutdownService()
shutdownService in interface IInternalServiceshutdownService in class BasicServicepublic boolean customIsValid()
public IFuture<Void> getNextIdleFuture()
getNextIdleFuture in interface IExecutionServiceCopyright © 2012. All Rights Reserved.