public interface RExecutorService extends ExecutorService, RExecutorServiceAsync
ExecutorService| Modifier and Type | Field and Description |
|---|---|
static String |
MAPREDUCE_NAME
MapReduce's executor name
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancelTask(String taskId)
Cancel task by id
|
int |
countActiveWorkers()
Returns active workers amount available for tasks execution.
|
boolean |
delete()
Deletes executor request queue and state objects
|
void |
execute(Runnable... tasks)
Submits tasks batch for execution synchronously.
|
String |
getName()
Returns executor name
|
int |
getTaskCount()
Returns amount of tasks awaiting for execution and/or currently in execution.
|
Set<String> |
getTaskIds()
Returns list of task ids awaiting for execution and/or currently in execution.
|
boolean |
hasTask(String taskId)
Returns
true if this Executor Service has task
by taskId awaiting for execution and/or currently in execution |
void |
registerWorkers(int workers)
Deprecated.
|
void |
registerWorkers(int workers,
ExecutorService executor)
Deprecated.
|
void |
registerWorkers(WorkerOptions options)
Register workers
|
RExecutorBatchFuture |
submit(Callable<?>... tasks)
Submits tasks batch for execution synchronously.
|
<T> RExecutorFuture<T> |
submit(Callable<T> task)
Submits a value-returning task for execution synchronously and returns a
Future representing the pending results of the task.
|
RExecutorBatchFuture |
submit(Runnable... tasks)
Submits tasks batch for execution synchronously.
|
RExecutorFuture<?> |
submit(Runnable task)
Submits a Runnable task for execution and returns a Future
representing that task.
|
<T> RExecutorFuture<T> |
submit(Runnable task,
T result)
Submits a Runnable task for execution and returns a Future
representing that task.
|
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNowcancelTaskAsync, deleteAsync, getTaskCountAsync, getTaskIdsAsync, hasTaskAsync, submitAsync, submitAsync, submitAsync, submitAsyncstatic final String MAPREDUCE_NAME
<T> RExecutorFuture<T> submit(Callable<T> task)
get method will return the task's result upon
successful completion.submit in interface ExecutorServiceT - the type of the task's resulttask - the task to submitRExecutorBatchFuture submit(Callable<?>... tasks)
tasks - - tasks to execute<T> RExecutorFuture<T> submit(Runnable task, T result)
get method will
return the given result upon successful completion.submit in interface ExecutorServiceT - the type of the resulttask - the task to submitresult - the result to returnRExecutorFuture<?> submit(Runnable task)
get method will
return null upon successful completion.submit in interface ExecutorServicetask - the task to submitRExecutorBatchFuture submit(Runnable... tasks)
tasks - - tasks to executeString getName()
boolean delete()
true if any of objects were deleted@Deprecated void registerWorkers(int workers)
@Deprecated void registerWorkers(int workers, ExecutorService executor)
void registerWorkers(WorkerOptions options)
options - - worker optionsint getTaskCount()
int countActiveWorkers()
boolean hasTask(String taskId)
true if this Executor Service has task
by taskId awaiting for execution and/or currently in executiontaskId - - id of tasktrue if this Executor Service has taskSet<String> getTaskIds()
boolean cancelTask(String taskId)
taskId - - id of tasktrue if task has been canceled successfullyRExecutorFuture.getTaskId()void execute(Runnable... tasks)
tasks - - tasks to executeCopyright © 2014–2019 Redisson. All rights reserved.