// Path: hazeltask-core/src/main/java/com/hazeltask/executor/TaskResponseListener.java
// public interface TaskResponseListener extends MessageListener<TaskResponse<Serializable>> {
//     
// }
// 
// Path: hazeltask-core/src/main/java/com/hazeltask/executor/task/DefaultTaskIdAdapter.java
// public class DefaultTaskIdAdapter implements TaskIdAdapter<Object, Integer, Serializable> {
//     private static int GROUP = Integer.MIN_VALUE;
// 
//     @Override
//     public Integer getTaskGroup(Object task) {
//         return GROUP;
//     }
// 
//     @Override
//     public boolean supports(Object task) {
//         //we support all objects!
//         return true;
//     }
// 
//     @Override
//     public Serializable getTaskInfo(Object task) {
//         return null;
//     }
// }
// 
// Path: hazeltask-core/src/main/java/com/hazeltask/executor/task/TaskIdAdapter.java
// public interface TaskIdAdapter<T, GROUP extends Serializable, INFO extends Serializable> {
//     
//     /**
//      * This might be useful to fill out to be able to get at task information
//      * without having to deserialize the entire task. It is also the only
//      * task-specific identifiable information available in TaskResponseListener
//      * 
//      * @param task
//      * @return
//      */
//     public INFO getTaskInfo(T task);
//     
//     /**
//      * The group does not need to be equal for successive calls with the same task
//      * @param task
//      * @return
//      */
//     public GROUP getTaskGroup(T task);
//     
//     /**
//      * Given an object, return whether this adapater supports identifying the group
//      * Generally the logic is: <code>return task instanceof T</code>
//      * 
//      * We have this here as a validation step when you submit a Runnable to the ExecutorService.
//      * Since ExecutorService isn't generic, we need to take extra steps to ensure the task
//      * is able to be processed by the system
//      * 
//      * @param task
//      * @return
//      */
//     public boolean supports(Object task);
// }


import java.io.Serializable;
import java.util.List;
import java.util.concurrent.TimeUnit;
import com.google.common.collect.Lists;
import com.hazeltask.executor.TaskResponseListener;
import com.hazeltask.executor.task.DefaultTaskIdAdapter;
import com.hazeltask.executor.task.TaskIdAdapter;
     */
    public ExecutorConfig<GROUP> disableFutureSupport() {
        this.enableFutureTracking = false;
        return this;
    }

    public boolean isFutureSupportEnabled() {
        return this.enableFutureTracking;
    }

    /**
     * The number of threads to use to work on tasks for this member
     * 
     * @param threadCount
     * @return
     */
    public ExecutorConfig<GROUP> withThreadCount(int threadCount) {
        this.corePoolSize = threadCount;
        
        //for now we will have a fixed thread pool size
        this.maxPoolSize = threadCount;
        return this;
    }

    /**
     * This adapter is used to take a Task and identify the GROUP it belongs to
     * 
     * @param taskIdAdapter
     * @return
     */
// Path: hazeltask-core/src/main/java/com/hazeltask/executor/TaskResponseListener.java
// public interface TaskResponseListener extends MessageListener<TaskResponse<Serializable>> {
//     
// }
// 
// Path: hazeltask-core/src/main/java/com/hazeltask/executor/task/DefaultTaskIdAdapter.java
// public class DefaultTaskIdAdapter implements TaskIdAdapter<Object, Integer, Serializable> {
//     private static int GROUP = Integer.MIN_VALUE;
// 
//     @Override
//     public Integer getTaskGroup(Object task) {
//         return GROUP;
//     }
// 
//     @Override
//     public boolean supports(Object task) {
//         //we support all objects!
//         return true;
//     }
// 
//     @Override
//     public Serializable getTaskInfo(Object task) {
//         return null;
//     }
// }
// 
// Path: hazeltask-core/src/main/java/com/hazeltask/executor/task/TaskIdAdapter.java
// public interface TaskIdAdapter<T, GROUP extends Serializable, INFO extends Serializable> {
//     
//     /**
//      * This might be useful to fill out to be able to get at task information
//      * without having to deserialize the entire task. It is also the only
//      * task-specific identifiable information available in TaskResponseListener
//      * 
//      * @param task
//      * @return
//      */
//     public INFO getTaskInfo(T task);
//     
//     /**
//      * The group does not need to be equal for successive calls with the same task
//      * @param task
//      * @return
//      */
//     public GROUP getTaskGroup(T task);
//     
//     /**
//      * Given an object, return whether this adapater supports identifying the group
//      * Generally the logic is: <code>return task instanceof T</code>
//      * 
//      * We have this here as a validation step when you submit a Runnable to the ExecutorService.
//      * Since ExecutorService isn't generic, we need to take extra steps to ensure the task
//      * is able to be processed by the system
//      * 
//      * @param task
//      * @return
//      */
//     public boolean supports(Object task);
// }


// Path: hazeltask-core/src/main/java/com/hazeltask/config/ExecutorConfig.java
import java.io.Serializable;
import java.util.List;
import java.util.concurrent.TimeUnit;
import com.google.common.collect.Lists;
import com.hazeltask.executor.TaskResponseListener;
import com.hazeltask.executor.task.DefaultTaskIdAdapter;
import com.hazeltask.executor.task.TaskIdAdapter;

     */
    public ExecutorConfig<GROUP> disableFutureSupport() {
        this.enableFutureTracking = false;
        return this;
    }

    public boolean isFutureSupportEnabled() {
        return this.enableFutureTracking;
    }

    /**
     * The number of threads to use to work on tasks for this member
     * 
     * @param threadCount
     * @return
     */
    public ExecutorConfig<GROUP> withThreadCount(int threadCount) {
        this.corePoolSize = threadCount;
        
        //for now we will have a fixed thread pool size
        this.maxPoolSize = threadCount;
        return this;
    }

    /**
     * This adapter is used to take a Task and identify the GROUP it belongs to
     * 
     * @param taskIdAdapter
     * @return
     */
    public ExecutorConfig<GROUP> withTaskIdAdapter(TaskIdAdapter<?,GROUP, ?> taskIdAdapter) {