public class GlobalScheduledExecutorService extends AbstractExecutorService<ScheduledThreadPoolExecutor>
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_CORE_POOL_SIZE
The core thread pool size.
|
static long |
DEFAULT_KEEP_ALIVE_TIME
Keep alive time in milli seconds.
|
static int |
DEFAULT_MAX_POOL_SIZE
The default maximal pool size.
|
DEFAULT_REPORT_RATE, DEFAULT_SHUTDOWN_DELAY, DEFAULT_SHUTDOWN_TIME, DEFAULT_WARNING_RATIO, executorService, logger, SMART_SHUTDOWN_STATUS_PRINT_RATE, SMART_SHUTDOWN_TIMEOUT| Modifier and Type | Method and Description |
|---|---|
static void |
execute(Runnable runnable) |
static <V> ScheduledFuture<V> |
schedule(Callable<V> callable,
long delay,
TimeUnit unit) |
static ScheduledFuture<?> |
schedule(Runnable command,
long delay,
TimeUnit unit) |
static ScheduledFuture<?> |
scheduleAtFixedRate(Runnable command,
long initialDelay,
long period,
TimeUnit unit) |
static ScheduledFuture<?> |
scheduleWithFixedDelay(Runnable command,
long initialDelay,
long delay,
TimeUnit unit) |
static <T> Future<T> |
submit(Callable<T> task) |
static Future<?> |
submit(Runnable task) |
allOf, allOf, allOf, allOf, allOf, allOf, allOf, allOf, allOf, allOf, allOf, allOf, allOf, allOfInclusiveResultFuture, applyErrorHandling, applyErrorHandling, atLeastOne, atLeastOne, atLeastOne, buildFutureCollection, forceShutdown, getExecutorLoad, getExecutorService, internalExecute, internalSubmit, internalSubmit, shutdown, shutdown, smartShutdown, toStringpublic static final long DEFAULT_KEEP_ALIVE_TIME
public static final int DEFAULT_MAX_POOL_SIZE
public static final int DEFAULT_CORE_POOL_SIZE
public static void execute(Runnable runnable)
public static ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
command - the task to executedelay - the time from now to delay executionunit - the time unit of the delay parameterget() method will return null upon completionRejectedExecutionException - if the task cannot be scheduled for executionScheduledExecutorServicepublic static <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit) throws RejectedExecutionException, CouldNotPerformException
V - the type of the callable's resultcallable - the function to executedelay - the time from now to delay executionunit - the time unit of the delay parameterRejectedExecutionException - if the task cannot be scheduled for executionNotAvailableException - if callable is nullCouldNotPerformExceptionScheduledExecutorServicepublic static ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) throws NotAvailableException, IllegalArgumentException, RejectedExecutionException
command - the task to executeinitialDelay - the time to delay first executionperiod - the period between successive executionsunit - the time unit of the initialDelay and period parametersget() method will throw an exception upon cancellationRejectedExecutionException - if the task cannot be scheduled for executionNotAvailableException - if command is nullIllegalArgumentException - if period less than or equal to zeroScheduledExecutorServicepublic static ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) throws NotAvailableException, IllegalArgumentException, RejectedExecutionException
command - the task to executeinitialDelay - the time to delay first executiondelay - the delay between the termination of one execution and the commencement of the nextunit - the time unit of the initialDelay and delay parametersget() method will throw an exception upon cancellationRejectedExecutionException - if the task cannot be scheduled for executionNotAvailableException - if command is nullIllegalArgumentException - if delay less than or equal to zeroScheduledExecutorServiceCopyright © 2015–2017 openbase.org. All rights reserved.