public interface DynamicSizedSchedulerInterface extends ScheduledExecutorService
| Modifier and Type | Method and Description |
|---|---|
Future<?> |
addThreadAndExecute(Runnable task)
Used when you want to ensure an extra thread is available to execute task.
|
Future<?> |
addThreadAndSchedule(Runnable task,
long delay,
TimeUnit unit)
Used when you want to ensure an extra thread is available for scheduled task.
|
void |
adjustPoolSize(int delta)
Adjusts the pool size by a given delta.
|
void |
setPoolSize(int newSize)
Update the pool thread count with this new value.
|
schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelayawaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow, submit, submit, submitvoid setPoolSize(int newSize)
newSize - New pool size that is superior to 0void adjustPoolSize(int delta)
delta - A positive or negative number to adjust the pool size by.Future<?> addThreadAndExecute(Runnable task)
task - Task to be executedFuture<?> addThreadAndSchedule(Runnable task, long delay, TimeUnit unit)
task - Task to be executeddelay - delay before executionunit - unit of delayCopyright © 2016. All rights reserved.