@Override
  public CliFunctionResult executeFunction(final FunctionContext context) {
    Cache cache = context.getCache();
    DistributedMember member = cache.getDistributedSystem().getDistributedMember();

    // Identify by name if the name is non-trivial. Otherwise, use the ID
    String memberId = !member.getName().equals("") ? member.getName() : member.getId();

    Set<AsyncEventQueue> asyncEventQueues = cache.getAsyncEventQueues();

    List<AsyncEventQueueDetails> details = asyncEventQueues.stream().map(queue -> {
      AsyncEventListener listener = queue.getAsyncEventListener();
      Properties listenerProperties = new Properties();
      if (listener instanceof Declarable2) {
        listenerProperties = ((Declarable2) listener).getConfig();
      }

      return new AsyncEventQueueDetails(queue.getId(), queue.getBatchSize(), queue.isPersistent(),
          queue.getDiskStoreName(), queue.getMaximumQueueMemory(), listener.getClass().getName(),
          listenerProperties, isCreatedWithPausedEventDispatching(queue),
          queue.isDispatchingPaused());
    }).collect(Collectors.toList());

    return new CliFunctionResult(memberId, details);
  }
An implementation of GemFire Function interface used to determine all the async event queues that
exist for the entire cache, distributed across the GemFire distributed system.
<p>

@since GemFire 8.0
geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/functions/ListAsyncEventQueuesFunction.java