@ProviderType public interface ThrottledTaskRunner extends ThrottledTaskRunnerMBean
| Modifier and Type | Method and Description |
|---|---|
int |
getMaxThreads()
Get number of maximum threads supported by this thread manager
|
void |
logCompletion(long created,
long started,
long executed,
long finished,
boolean successful,
Throwable error)
Record statistics
|
void |
scheduleWork(Runnable work)
Schedule some kind of work to run in the future using the internal thread pool.
|
void |
scheduleWork(Runnable work,
CancelHandler cancelHandler)
Schedule some kind of work to run in the future using the internal thread pool.
|
void |
scheduleWork(Runnable work,
CancelHandler cancelHandler,
int priority)
Schedule some kind of work to run in the future using the internal thread pool.
|
void |
scheduleWork(Runnable work,
int priority)
Schedule some kind of work to run in the future using the internal thread pool.
|
void |
waitForLowCpuAndLowMemory()
Waits for CPU and Memory usage to fall below an acceptable threshold.
|
clearProcessingStatistics, getActiveCount, getCompletedTaskCount, getStatistics, getTaskCount, isRunning, pauseExecution, resumeExecution, setThreadPoolSize, stopExecutionvoid waitForLowCpuAndLowMemory()
throws InterruptedException
InterruptedException - If the thread was interruptedvoid scheduleWork(Runnable work)
work - void scheduleWork(Runnable work, CancelHandler cancelHandler)
work - cancelHandler - void scheduleWork(Runnable work, int priority)
work - priority - the priority of the taskvoid scheduleWork(Runnable work, CancelHandler cancelHandler, int priority)
work - cancelHandler - priority - the priority of the taskvoid logCompletion(long created,
long started,
long executed,
long finished,
boolean successful,
Throwable error)
created - Task creation time (Milliseconds since epoch) -- This is when the work is added to the queuestarted - Start time (Milliseconds since epoch) -- This is recorded when the work is picked up by a threadexecuted - Execution time (Milliseconds since epoch) -- this is recorded after CPU/Memory throttle completesfinished - Finish time (Milliseconds since epoch) -- This is recorded when work finishes (or throws an error)successful - If true, action concluded normallyerror - Exception caught, if any.int getMaxThreads()
Copyright © 2013–2020 Adobe. All rights reserved.