public class IgniteStripedThreadPoolExecutor extends Object implements ExecutorService
ExecutorService that executes submitted tasks using pooled grid threads.| Constructor and Description |
|---|
IgniteStripedThreadPoolExecutor(int concurrentLvl,
String igniteInstanceName,
String threadNamePrefix,
Thread.UncaughtExceptionHandler eHnd)
Create striped thread pool.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long timeout,
TimeUnit unit) |
void |
execute(Runnable cmd) |
void |
execute(Runnable task,
int idx)
Executes the given command at some time in the future.
|
<T> @NotNull List<Future<T>> |
invokeAll(Collection<? extends Callable<T>> tasks) |
<T> @NotNull List<Future<T>> |
invokeAll(Collection<? extends Callable<T>> tasks,
long timeout,
TimeUnit unit) |
<T> T |
invokeAny(Collection<? extends Callable<T>> tasks) |
<T> T |
invokeAny(Collection<? extends Callable<T>> tasks,
long timeout,
TimeUnit unit) |
boolean |
isShutdown() |
boolean |
isTerminated() |
void |
shutdown() |
List<Runnable> |
shutdownNow() |
<T> @NotNull Future<T> |
submit(Callable<T> task) |
@NotNull Future<?> |
submit(Runnable task) |
<T> @NotNull Future<T> |
submit(Runnable task,
T res) |
int |
threadId(int idx) |
String |
toString() |
public IgniteStripedThreadPoolExecutor(int concurrentLvl,
String igniteInstanceName,
String threadNamePrefix,
Thread.UncaughtExceptionHandler eHnd)
concurrentLvl - Concurrency level.igniteInstanceName - Node name.threadNamePrefix - Thread name prefix.public void execute(Runnable task, int idx)
index
will be executed in the same thread.task - the runnable taskidx - Striped index.RejectedExecutionException - if this task cannot be
accepted for execution.NullPointerException - If command is nullpublic int threadId(int idx)
idx - Index.public void shutdown()
shutdown in interface ExecutorServicepublic List<Runnable> shutdownNow()
shutdownNow in interface ExecutorServicepublic boolean isShutdown()
isShutdown in interface ExecutorServicepublic boolean isTerminated()
isTerminated in interface ExecutorServicepublic boolean awaitTermination(long timeout,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface ExecutorServiceInterruptedException@NotNull public <T> @NotNull Future<T> submit(Callable<T> task)
submit in interface ExecutorService@NotNull public <T> @NotNull Future<T> submit(Runnable task, T res)
submit in interface ExecutorService@NotNull public @NotNull Future<?> submit(Runnable task)
submit in interface ExecutorService@NotNull public <T> @NotNull List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks)
invokeAll in interface ExecutorService@NotNull public <T> @NotNull List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)
invokeAll in interface ExecutorService@NotNull public <T> T invokeAny(Collection<? extends Callable<T>> tasks)
invokeAny in interface ExecutorServicepublic <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)
invokeAny in interface ExecutorService
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.2 Release Date : February 6 2019