com.atlassian.plugin.osgi.spring
Class ThreadPoolAsyncTaskExecutor
java.lang.Object
com.atlassian.plugin.osgi.spring.ThreadPoolAsyncTaskExecutor
- All Implemented Interfaces:
- org.springframework.core.task.AsyncTaskExecutor, org.springframework.core.task.TaskExecutor
public class ThreadPoolAsyncTaskExecutor
- extends java.lang.Object
- implements org.springframework.core.task.AsyncTaskExecutor
Executes spring tasks using a cached thread pool that expands as necessary. Overrides the default Spring executor
that spawns a new thread for every application context creation.
- Since:
- 2.5.0
| Fields inherited from interface org.springframework.core.task.AsyncTaskExecutor |
TIMEOUT_IMMEDIATE, TIMEOUT_INDEFINITE |
|
Method Summary |
void |
execute(java.lang.Runnable task)
Executes the runnable |
void |
execute(java.lang.Runnable task,
long startTimeout)
Executes the runnable |
void |
shutdown()
Shuts down the internal ExecutorService to ensure that all threads are stopped in order to allow the JVM
to terminate cleanly in a timely fashion. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThreadPoolAsyncTaskExecutor
public ThreadPoolAsyncTaskExecutor()
execute
public void execute(java.lang.Runnable task,
long startTimeout)
- Executes the runnable
- Specified by:
execute in interface org.springframework.core.task.AsyncTaskExecutor
- Parameters:
task - The runnable taskstartTimeout - The start timeout (ignored)
execute
public void execute(java.lang.Runnable task)
- Executes the runnable
- Specified by:
execute in interface org.springframework.core.task.TaskExecutor
- Parameters:
task - The runnable task
shutdown
public void shutdown()
- Shuts down the internal
ExecutorService to ensure that all threads are stopped in order to allow the JVM
to terminate cleanly in a timely fashion.
Copyright © 2012 Atlassian. All Rights Reserved.