com.atlassian.plugin.osgi.spring
Class ThreadPoolAsyncTaskExecutor

java.lang.Object
  extended by 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

Field Summary
 
Fields inherited from interface org.springframework.core.task.AsyncTaskExecutor
TIMEOUT_IMMEDIATE, TIMEOUT_INDEFINITE
 
Constructor Summary
ThreadPoolAsyncTaskExecutor()
           
 
Method Summary
 void execute(java.lang.Runnable task)
          Executes the runnable
 void execute(java.lang.Runnable task, long startTimeout)
          Executes the runnable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadPoolAsyncTaskExecutor

public ThreadPoolAsyncTaskExecutor()
Method Detail

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 task
startTimeout - 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


Copyright © 2010 Atlassian. All Rights Reserved.