/**
   * Creates and starts an async event queue in the current cache. The queue is configured using the
   * {@link AsyncEventQueueDescription} corresponding to the given configuration from {@link
   * AsyncEventQueuePrms#names}. The id for the queue is the same as the queue configuration name.
   *
   * <p>This method is thread-safe. The async event queues for a given logical queue configuration
   * will only be created once.
   *
   * @throws HydraRuntimeException if an attempt is made to reconfigure an existing async event
   *     queue.
   */
  public static synchronized AsyncEventQueue createAndStartAsyncEventQueue(
      String asyncEventQueueConfig) {
    AsyncEventQueue queue = getAsyncEventQueue(asyncEventQueueConfig);
    if (queue == null) {

      // get the cache
      Cache cache = CacheHelper.getCache();
      if (cache == null) {
        String s = "Cache has not been created yet";
        throw new HydraRuntimeException(s);
      }

      // look up the async event queue configuration
      AsyncEventQueueDescription aeqd = getAsyncEventQueueDescription(asyncEventQueueConfig);

      // create the disk store
      DiskStoreHelper.createDiskStore(aeqd.getDiskStoreDescription().getName());

      // create the async event queue
      queue = createAsyncEventQueue(aeqd, cache);
    }
    return queue;
  }