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)
Cancels task by id
|
int |
countActiveWorkers()
Returns active worker groups
|
boolean |
delete()
Deletes executor request queue and state objects
|
void |
execute(Runnable... tasks)
Submits tasks batch for execution synchronously.
|
String |
getName()
Returns executor name
|
void |
registerWorkers(int workers)
Register workers
|
void |
registerWorkers(int workers,
ExecutorService executor)
Register workers with custom executor
|
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, shutdownNow
deleteAsync, submitAsync, submitAsync, submitAsync, submitAsync
static 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 ExecutorService
T
- 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 ExecutorService
T
- 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 ExecutorService
task
- the task to submitRExecutorBatchFuture submit(Runnable... tasks)
tasks
- - tasks to executeString getName()
boolean delete()
true
if any of objects were deletedvoid registerWorkers(int workers)
workers
- - workers amountvoid registerWorkers(int workers, ExecutorService executor)
workers
- - workers amountexecutor
- - executor instanceint countActiveWorkers()
boolean cancelTask(String taskId)
taskId
- - id of tasktrue
if task has been canceled successfullyRExecutorFuture.getTaskId()
void execute(Runnable... tasks)
tasks
- - tasks to executeCopyright © 2014–2018 The Redisson Project. All rights reserved.