public void submit(String queueName,DispatcherTask dispatcherTask){
synchronized (syncRoot) {
    DispatcherTaskRunner currentTaskRunner=currentTasksMap.get(queueName);
    if (currentTaskRunner == null) {
      currentTaskRunner=new DispatcherTaskRunner(queueName,dispatcherTask);
      currentTasksMap.put(queueName,currentTaskRunner);
      executorService.execute(currentTaskRunner);
    }
 else {
      enqueueNextTask(queueName,dispatcherTask);
    }
  }
}

public void submit ( String queueName , DispatcherTask dispatcherTask ) { synchronized ( syncRoot ) { DispatcherTaskRunner currentTaskRunner = currentTasksMap . get ( queueName ) ; if ( currentTaskRunner == null ) { currentTaskRunner = new DispatcherTaskRunner ( queueName , dispatcherTask ) ; currentTasksMap . put ( queueName , currentTaskRunner ) ; executorService . execute ( currentTaskRunner ) ; } else { enqueueNextTask ( queueName , dispatcherTask ) ; } } }
submits task to the specific queue
