public final class ExecutionServiceImpl extends Object implements InternalExecutionService
ASYNC_EXECUTOR, CLIENT_BLOCKING_EXECUTOR, CLIENT_EXECUTOR, CLIENT_MANAGEMENT_EXECUTOR, CLIENT_QUERY_EXECUTOR, IO_EXECUTOR, MAP_LOAD_ALL_KEYS_EXECUTOR, MAP_LOADER_EXECUTOR, OFFLOADABLE_EXECUTOR, QUERY_EXECUTOR, SCHEDULED_EXECUTOR, SYSTEM_EXECUTOR| Constructor and Description |
|---|
ExecutionServiceImpl(NodeEngineImpl nodeEngine) |
public ExecutionServiceImpl(NodeEngineImpl nodeEngine)
public LoggingScheduledExecutor getScheduledExecutorService()
public ManagedExecutorService register(String name, int defaultPoolSize, int defaultQueueCapacity, ExecutorType type)
register in interface ExecutionServicename - for the executor servicedefaultPoolSize - the maximum number of threads to allow in the pooldefaultQueueCapacity - the queue to use for holding tasks before they are executed.type - @ExecutorType.CACHED or @ExecutorType.CONCRETEpublic ManagedExecutorService register(String name, int defaultPoolSize, int defaultQueueCapacity, ThreadFactory threadFactory)
ExecutionServiceExecutorType.CONCRETE type.
The executors with @ExecutorType.CACHED types can not have custom thread factory since they will share the
threads with other @ExecutorType.CACHED executors.register in interface ExecutionServicename - for the executor servicedefaultPoolSize - the maximum number of threads to allow in the pooldefaultQueueCapacity - the queue to use for holding tasks before they are executed.threadFactory - custom thread factory for the managed executor service.public ManagedExecutorService getExecutor(String name)
getExecutor in interface ExecutionServicepublic ManagedExecutorService getDurable(String name)
getDurable in interface InternalExecutionServicepublic ExecutorService getScheduledDurable(String name)
getScheduledDurable in interface InternalExecutionServicepublic <V> ICompletableFuture<V> asCompletableFuture(Future<V> future)
asCompletableFuture in interface ExecutionServicepublic void execute(String name, Runnable command)
execute in interface ExecutionServicepublic void executeDurable(String name, Runnable command)
executeDurable in interface InternalExecutionServicepublic Future<?> submit(String name, Runnable task)
submit in interface ExecutionServicepublic <T> Future<T> submit(String name, Callable<T> task)
submit in interface ExecutionServicepublic ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
schedule in interface ExecutionServicepublic ScheduledFuture<?> schedule(String name, Runnable command, long delay, TimeUnit unit)
schedule in interface ExecutionServicepublic ScheduledFuture<?> scheduleDurable(String name, Runnable command, long delay, TimeUnit unit)
scheduleDurable in interface InternalExecutionServicepublic <V> ScheduledFuture<Future<V>> scheduleDurable(String name, Callable<V> command, long delay, TimeUnit unit)
scheduleDurable in interface InternalExecutionServicepublic ScheduledFuture<?> scheduleWithRepetition(Runnable command, long initialDelay, long period, TimeUnit unit)
scheduleWithRepetition in interface ExecutionServicepublic ScheduledFuture<?> scheduleWithRepetition(String name, Runnable command, long initialDelay, long period, TimeUnit unit)
scheduleWithRepetition in interface ExecutionServicepublic ScheduledFuture<?> scheduleDurableWithRepetition(String name, Runnable command, long initialDelay, long period, TimeUnit unit)
scheduleDurableWithRepetition in interface InternalExecutionServicepublic TaskScheduler getGlobalTaskScheduler()
getGlobalTaskScheduler in interface ExecutionServicepublic TaskScheduler getTaskScheduler(String name)
getTaskScheduler in interface ExecutionServicepublic void shutdown()
public void shutdownExecutor(String name)
shutdownExecutor in interface ExecutionServicepublic void shutdownDurableExecutor(String name)
shutdownDurableExecutor in interface InternalExecutionServicepublic void shutdownScheduledDurableExecutor(String name)
shutdownScheduledDurableExecutor in interface InternalExecutionServiceCopyright © 2021 Hazelcast, Inc.. All Rights Reserved.