private void enqueueNextTask(String queueName,DispatcherTask dispatcherTask){
synchronized (syncRoot) {
    Queue<DispatcherTask> queue=taskQueuesMap.get(queueName);
    if (queue == null) {
      queue=new LinkedList<>();
      taskQueuesMap.put(queueName,queue);
    }
    queue.add(dispatcherTask);
  }
}

private void enqueueNextTask ( String queueName , DispatcherTask dispatcherTask ) { synchronized ( syncRoot ) { Queue < DispatcherTask > queue = taskQueuesMap . get ( queueName ) ; if ( queue == null ) { queue = new LinkedList < > ( ) ; taskQueuesMap . put ( queueName , queue ) ; } queue . add ( dispatcherTask ) ; } }
adds next task to be executed
