public final class ClientExecutionServiceImpl extends Object implements ClientExecutionService
Modifier and Type | Field and Description |
---|---|
static HazelcastProperty |
INTERNAL_EXECUTOR_POOL_SIZE |
ASYNC_EXECUTOR, CLIENT_EXECUTOR, CLIENT_QUERY_EXECUTOR, IO_EXECUTOR, MAP_LOAD_ALL_KEYS_EXECUTOR, MAP_LOADER_EXECUTOR, QUERY_EXECUTOR, SCHEDULED_EXECUTOR, SYSTEM_EXECUTOR
Constructor and Description |
---|
ClientExecutionServiceImpl(String name,
ThreadGroup threadGroup,
ClassLoader classLoader,
HazelcastProperties properties,
int poolSize,
LoggingService loggingService) |
public static final HazelcastProperty INTERNAL_EXECUTOR_POOL_SIZE
public ClientExecutionServiceImpl(String name, ThreadGroup threadGroup, ClassLoader classLoader, HazelcastProperties properties, int poolSize, LoggingService loggingService)
public void executeInternal(Runnable runnable)
public <T> ICompletableFuture<T> submitInternal(Runnable runnable)
public void execute(Runnable command)
ClientExecutionService
execute
in interface ClientExecutionService
execute
in interface Executor
command
- to runpublic ICompletableFuture<?> submit(Runnable task)
submit
in interface ClientExecutionService
public <T> ICompletableFuture<T> submit(Callable<T> task)
submit
in interface ClientExecutionService
public ManagedExecutorService register(String name, int poolSize, int queueCapacity, ExecutorType type)
register
in interface ExecutionService
public ManagedExecutorService getExecutor(String name)
getExecutor
in interface ExecutionService
public void shutdownExecutor(String name)
shutdownExecutor
in interface ExecutionService
public void execute(String name, Runnable command)
execute
in interface ExecutionService
public Future<?> submit(String name, Runnable task)
submit
in interface ExecutionService
public <T> Future<T> submit(String name, Callable<T> task)
submit
in interface ExecutionService
public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
The response of the remote call is not handled in the Runnable
itself, but rather
in the execution callback so that executor is not blocked because of a remote operation.
schedule
in interface ExecutionService
command
- the Runnable
to scheduledelay
- the delay for the scheduled executionunit
- the TimeUnit
of the delaypublic ScheduledFuture<?> schedule(String name, Runnable command, long delay, TimeUnit unit)
schedule
in interface ExecutionService
public ScheduledFuture<?> scheduleWithRepetition(Runnable command, long initialDelay, long period, TimeUnit unit)
scheduleWithRepetition
in interface ExecutionService
public ScheduledFuture<?> scheduleWithRepetition(String name, Runnable command, long initialDelay, long period, TimeUnit unit)
scheduleWithRepetition
in interface ExecutionService
public TaskScheduler getGlobalTaskScheduler()
getGlobalTaskScheduler
in interface ExecutionService
public TaskScheduler getTaskScheduler(String name)
getTaskScheduler
in interface ExecutionService
public <V> ICompletableFuture<V> asCompletableFuture(Future<V> future)
asCompletableFuture
in interface ExecutionService
public ExecutorService getAsyncExecutor()
getAsyncExecutor
in interface ClientExecutionService
public ExecutorService getInternalExecutor()
public void shutdown()
public static void shutdownExecutor(String name, ExecutorService executor, ILogger logger)
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.