// Path: hazeltask-core/src/main/java/com/hazeltask/config/HazeltaskConfig.java
// public class HazeltaskConfig<GROUP extends Serializable> {
//     private HazelcastInstance     hazelcast;
//     private String                topologyName   = Hazeltask.DEFAULT_TOPOLOGY;
//     private ExecutorConfig<GROUP> executorConfig = new ExecutorConfig<GROUP>();
//     private MetricsConfig         metricsConfig  = new MetricsConfig();
//     private NamedThreadFactory    threadFactory;
//     
//     /**
//      * Topology names allow you to run multiple Hazeltask platforms on the same JVM.  You may retrive your Hazeltask intance
//      * later through the Hazeltask.getInstanceByName.  The default name is defined as Hazeltask.DEFAULT_TOPOLOGY
//      * 
//      * @param name
//      * @return
//      */
//     public HazeltaskConfig<GROUP> withName(String name) {
//         this.topologyName = name;
//         return this;
//     }
//     
//     /**
//      * Distributed executor configuration options.  The class com.hazeltask.config.defaults.ExecutorConfigs contains 
//      * default common starter execution configurations
//      * 
//      * @see ExecutorConfigs
//      * @param executorConfig
//      * @return
//      */
//     public HazeltaskConfig<GROUP> withExecutorConfig(ExecutorConfig<GROUP> executorConfig) {
//         this.executorConfig = executorConfig;
//         return this;
//     }
//     
//     /**
//      * If you don't specify a hazelcast instance, we will use the default instance
//      * @param hazelcast
//      * @return
//      */
//     public HazeltaskConfig<GROUP> withHazelcastInstance(HazelcastInstance hazelcast) {
//         this.hazelcast = hazelcast;
//         return this;
//     }
//     
//     /**
//      * Allows the customization of Yammer metrics collected throughout Hazeltask 
//      * 
//      * @see http://metrics.codahale.com/
//      * @param metricsConfig
//      * @return
//      */
//     public HazeltaskConfig<GROUP> withMetricsConfig(MetricsConfig metricsConfig) {
//         this.metricsConfig = metricsConfig;
//         return this;
//     }
//     
//     public MetricsConfig getMetricsConfig() {
//         return this.metricsConfig;
//     }
//     
//     public MetricRegistry getMetricsRegistry() {
//         return this.metricsConfig.getMetricsRegistry();
//     }
// 
//     public HazelcastInstance getHazelcast() {
//         return hazelcast;
//     }
// 
//     public String getTopologyName() {
//         return topologyName;
//     }
//     
//     public ExecutorConfig<GROUP> getExecutorConfig() {
//         return this.executorConfig;
//     }
//     
//     /**
//      * All threads created by Hazeltask will be created through this threadFactory.  This 
//      * allows you to customize all the threads used 
//      * 
//      * @param threadFactory
//      * @return
//      */
//     public HazeltaskConfig<GROUP> withThreadFactory(NamedThreadFactory threadFactory) {
//         this.threadFactory = threadFactory;
//         return this;
//     }
//     
//     public NamedThreadFactory getThreadFactory() {
//         return this.threadFactory;
//     }
// }


import java.io.Serializable;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import com.hazeltask.config.HazeltaskConfig;
package com.hazeltask;



public final class Hazeltask {
    public static final String DEFAULT_TOPOLOGY = "DefaultTopology";
    public static ConcurrentMap<String, HazeltaskInstance<?>> instances = new ConcurrentHashMap<String, HazeltaskInstance<?>>();

    private Hazeltask() {

    }

    @SuppressWarnings("unchecked")
    public static <GROUP extends Serializable> HazeltaskInstance<GROUP> getInstanceByName(String topology) {
        return (HazeltaskInstance<GROUP>) instances.get(topology);
    }
    
    /**
     * @deprecated This is deprecated because it relies in the deprecated Hazelcast.getDefaultInstance
     * @see newHazeltaskInstance
     * @see 
     * @return
     */
    @Deprecated
    public static HazeltaskInstance<Integer> getDefaultInstance() {
// Path: hazeltask-core/src/main/java/com/hazeltask/config/HazeltaskConfig.java
// public class HazeltaskConfig<GROUP extends Serializable> {
//     private HazelcastInstance     hazelcast;
//     private String                topologyName   = Hazeltask.DEFAULT_TOPOLOGY;
//     private ExecutorConfig<GROUP> executorConfig = new ExecutorConfig<GROUP>();
//     private MetricsConfig         metricsConfig  = new MetricsConfig();
//     private NamedThreadFactory    threadFactory;
//     
//     /**
//      * Topology names allow you to run multiple Hazeltask platforms on the same JVM.  You may retrive your Hazeltask intance
//      * later through the Hazeltask.getInstanceByName.  The default name is defined as Hazeltask.DEFAULT_TOPOLOGY
//      * 
//      * @param name
//      * @return
//      */
//     public HazeltaskConfig<GROUP> withName(String name) {
//         this.topologyName = name;
//         return this;
//     }
//     
//     /**
//      * Distributed executor configuration options.  The class com.hazeltask.config.defaults.ExecutorConfigs contains 
//      * default common starter execution configurations
//      * 
//      * @see ExecutorConfigs
//      * @param executorConfig
//      * @return
//      */
//     public HazeltaskConfig<GROUP> withExecutorConfig(ExecutorConfig<GROUP> executorConfig) {
//         this.executorConfig = executorConfig;
//         return this;
//     }
//     
//     /**
//      * If you don't specify a hazelcast instance, we will use the default instance
//      * @param hazelcast
//      * @return
//      */
//     public HazeltaskConfig<GROUP> withHazelcastInstance(HazelcastInstance hazelcast) {
//         this.hazelcast = hazelcast;
//         return this;
//     }
//     
//     /**
//      * Allows the customization of Yammer metrics collected throughout Hazeltask 
//      * 
//      * @see http://metrics.codahale.com/
//      * @param metricsConfig
//      * @return
//      */
//     public HazeltaskConfig<GROUP> withMetricsConfig(MetricsConfig metricsConfig) {
//         this.metricsConfig = metricsConfig;
//         return this;
//     }
//     
//     public MetricsConfig getMetricsConfig() {
//         return this.metricsConfig;
//     }
//     
//     public MetricRegistry getMetricsRegistry() {
//         return this.metricsConfig.getMetricsRegistry();
//     }
// 
//     public HazelcastInstance getHazelcast() {
//         return hazelcast;
//     }
// 
//     public String getTopologyName() {
//         return topologyName;
//     }
//     
//     public ExecutorConfig<GROUP> getExecutorConfig() {
//         return this.executorConfig;
//     }
//     
//     /**
//      * All threads created by Hazeltask will be created through this threadFactory.  This 
//      * allows you to customize all the threads used 
//      * 
//      * @param threadFactory
//      * @return
//      */
//     public HazeltaskConfig<GROUP> withThreadFactory(NamedThreadFactory threadFactory) {
//         this.threadFactory = threadFactory;
//         return this;
//     }
//     
//     public NamedThreadFactory getThreadFactory() {
//         return this.threadFactory;
//     }
// }


// Path: hazeltask-core/src/main/java/com/hazeltask/Hazeltask.java
import java.io.Serializable;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import com.hazeltask.config.HazeltaskConfig;

package com.hazeltask;



public final class Hazeltask {
    public static final String DEFAULT_TOPOLOGY = "DefaultTopology";
    public static ConcurrentMap<String, HazeltaskInstance<?>> instances = new ConcurrentHashMap<String, HazeltaskInstance<?>>();

    private Hazeltask() {

    }

    @SuppressWarnings("unchecked")
    public static <GROUP extends Serializable> HazeltaskInstance<GROUP> getInstanceByName(String topology) {
        return (HazeltaskInstance<GROUP>) instances.get(topology);
    }
    
    /**
     * @deprecated This is deprecated because it relies in the deprecated Hazelcast.getDefaultInstance
     * @see newHazeltaskInstance
     * @see 
     * @return
     */
    @Deprecated
    public static HazeltaskInstance<Integer> getDefaultInstance() {
        HazeltaskConfig<Integer> hazeltaskConfig = new HazeltaskConfig<Integer>();