// Path: src/main/java/com/baidu/unbiz/multitask/constants/DefaultThreadPoolConfig.java
// public class DefaultThreadPoolConfig implements ThreadPoolConfig {
// 
//     public int coreTaskNum() {
//         return CORE_TASK_NUM;
//     }
// 
//     public int maxTaskNum() {
//         return MAX_TASK_NUM;
//     }
// 
//     public int maxCacheTaskNum() {
//         return MAX_CACHE_TASK_NUM;
//     }
// 
//     public int queueFullSleepTime() {
//         return QUEUE_FULL_SLEEP_TIME;
//     }
// 
//     public long taskTimeoutMillSeconds() {
//         return TASK_TIMEOUT_MILL_SECONDS;
//     }
// }
// 
// Path: src/main/java/com/baidu/unbiz/multitask/constants/ThreadPoolConfig.java
// public interface ThreadPoolConfig extends TaskConfig {
// 
//     long taskTimeoutMillSeconds();
//     int queueFullSleepTime();
//     int maxCacheTaskNum();
//     int coreTaskNum();
//     int maxTaskNum();
// }


import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Callable;
import java.util.concurrent.Executor;
import java.util.concurrent.Future;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.scheduling.concurrent.CustomizableThreadFactory;
import com.baidu.unbiz.multitask.constants.DefaultThreadPoolConfig;
import com.baidu.unbiz.multitask.constants.ThreadPoolConfig;
package com.baidu.unbiz.multitask.task.thread;




/**
 * 报表可并行处理的任务管理器
 *
 * @author wangchongjie
 * @since 2015-11-21 下午7:57:37
 */
public class TaskManager {

    private static final Log LOG = LogFactory.getLog(TaskManager.class);

// Path: src/main/java/com/baidu/unbiz/multitask/constants/DefaultThreadPoolConfig.java
// public class DefaultThreadPoolConfig implements ThreadPoolConfig {
// 
//     public int coreTaskNum() {
//         return CORE_TASK_NUM;
//     }
// 
//     public int maxTaskNum() {
//         return MAX_TASK_NUM;
//     }
// 
//     public int maxCacheTaskNum() {
//         return MAX_CACHE_TASK_NUM;
//     }
// 
//     public int queueFullSleepTime() {
//         return QUEUE_FULL_SLEEP_TIME;
//     }
// 
//     public long taskTimeoutMillSeconds() {
//         return TASK_TIMEOUT_MILL_SECONDS;
//     }
// }
// 
// Path: src/main/java/com/baidu/unbiz/multitask/constants/ThreadPoolConfig.java
// public interface ThreadPoolConfig extends TaskConfig {
// 
//     long taskTimeoutMillSeconds();
//     int queueFullSleepTime();
//     int maxCacheTaskNum();
//     int coreTaskNum();
//     int maxTaskNum();
// }


// Path: src/main/java/com/baidu/unbiz/multitask/task/thread/TaskManager.java
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Callable;
import java.util.concurrent.Executor;
import java.util.concurrent.Future;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.scheduling.concurrent.CustomizableThreadFactory;
import com.baidu.unbiz.multitask.constants.DefaultThreadPoolConfig;
import com.baidu.unbiz.multitask.constants.ThreadPoolConfig;

package com.baidu.unbiz.multitask.task.thread;




/**
 * 报表可并行处理的任务管理器
 *
 * @author wangchongjie
 * @since 2015-11-21 下午7:57:37
 */
public class TaskManager {

    private static final Log LOG = LogFactory.getLog(TaskManager.class);

    private static volatile ThreadPoolConfig config = new DefaultThreadPoolConfig();