private void generateAsyncEventQueue(Cache cache) throws SAXException {
    Set<AsyncEventQueue> asyncEventQueues = cache.getAsyncEventQueues();
    for (AsyncEventQueue asyncEventQueue : asyncEventQueues) {
      AttributesImpl atts = new AttributesImpl();
      // id
      atts.addAttribute("", "", ID, "", asyncEventQueue.getId());
      // parallel
      if (generateDefaults() || asyncEventQueue.isParallel() != GatewaySender.DEFAULT_IS_PARALLEL) {
        atts.addAttribute("", "", PARALLEL, "", String.valueOf(asyncEventQueue.isParallel()));
      }
      // batch-size
      if (generateDefaults()
          || asyncEventQueue.getBatchSize() != GatewaySender.DEFAULT_BATCH_SIZE) {
        atts.addAttribute("", "", BATCH_SIZE, "", String.valueOf(asyncEventQueue.getBatchSize()));
      }
      // batch-time-interval
      if (generateDefaults()
          || asyncEventQueue.getBatchTimeInterval() != GatewaySender.DEFAULT_BATCH_TIME_INTERVAL) {
        atts.addAttribute("", "", BATCH_TIME_INTERVAL, "",
            String.valueOf(asyncEventQueue.getBatchTimeInterval()));
      }
      // enable-batch-conflation
      if (generateDefaults()
          || asyncEventQueue.isBatchConflationEnabled() != GatewaySender.DEFAULT_BATCH_CONFLATION) {
        atts.addAttribute("", "", ENABLE_BATCH_CONFLATION, "",
            String.valueOf(asyncEventQueue.isBatchConflationEnabled()));
      }
      // maximum-queue-memory
      if (generateDefaults()
          || asyncEventQueue
              .getMaximumQueueMemory() != GatewaySender.DEFAULT_MAXIMUM_QUEUE_MEMORY) {
        atts.addAttribute("", "", MAXIMUM_QUEUE_MEMORY, "",
            String.valueOf(asyncEventQueue.getMaximumQueueMemory()));
      }
      // enable-persistence
      if (generateDefaults()
          || asyncEventQueue.isPersistent() != GatewaySender.DEFAULT_PERSISTENCE_ENABLED) {
        atts.addAttribute("", "", PERSISTENT, "", String.valueOf(asyncEventQueue.isPersistent()));
      }
      if (asyncEventQueue.isPersistent()) {
        // disk-store-name
        if (generateDefaults() || (asyncEventQueue.getDiskStoreName() != null
            && !asyncEventQueue.getDiskStoreName().equals(""))) {
          atts.addAttribute("", "", DISK_STORE_NAME, "",
              String.valueOf(asyncEventQueue.getDiskStoreName()));
        }
      }
      // dispatcher-threads
      if (generateDefaults()
          || asyncEventQueue.getDispatcherThreads() != GatewaySender.DEFAULT_DISPATCHER_THREADS) {
        atts.addAttribute("", "", DISPATCHER_THREADS, "",
            String.valueOf(asyncEventQueue.getDispatcherThreads()));
      }
      // order-policy
      if (asyncEventQueue.getOrderPolicy() != null) {
        if (generateDefaults()
            || !asyncEventQueue.getOrderPolicy().equals(GatewaySender.DEFAULT_ORDER_POLICY)) {
          atts.addAttribute("", "", ORDER_POLICY, "",
              String.valueOf(asyncEventQueue.getOrderPolicy()));
        }
      }
      // eviction and expiration events
      if (version.compareTo(CacheXmlVersion.GEODE_1_0) >= 0) {
        if (generateDefaults() || asyncEventQueue
            .isForwardExpirationDestroy() != (GatewaySender.DEFAULT_FORWARD_EXPIRATION_DESTROY)) {
          atts.addAttribute("", "", FORWARD_EXPIRATION_DESTROY, "",
              String.valueOf(asyncEventQueue.isForwardExpirationDestroy()));
        }
      }
      // disk-synchronous
      if (generateDefaults()
          || asyncEventQueue.isDiskSynchronous() != GatewaySender.DEFAULT_DISK_SYNCHRONOUS) {
        atts.addAttribute("", "", DISK_SYNCHRONOUS, "",
            String.valueOf(asyncEventQueue.isDiskSynchronous()));
      }

      // AsyncEventQueue element start
      handler.startElement("", ASYNC_EVENT_QUEUE, ASYNC_EVENT_QUEUE, atts);

      List<GatewayEventFilter> eventFilters = asyncEventQueue.getGatewayEventFilters();
      if (eventFilters != null) {
        for (GatewayEventFilter eventFilter : eventFilters) {
          generateGatewayEventFilter(eventFilter);
        }
      }

      if (version.compareTo(CacheXmlVersion.GEMFIRE_8_0) >= 0) {
        if (asyncEventQueue.getGatewayEventSubstitutionFilter() != null) {
          generateGatewayEventSubstitutionFilter(
              asyncEventQueue.getGatewayEventSubstitutionFilter());
        }
      }

      AsyncEventListener asyncListener = asyncEventQueue.getAsyncEventListener();
      if (asyncListener != null) {
        generate(ASYNC_EVENT_LISTENER, asyncListener);
      }

      handler.endElement("", ASYNC_EVENT_QUEUE, ASYNC_EVENT_QUEUE);
    }
  }
Generates XML for a DynamicRegionFactory.Config

@since GemFire 4.3
geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheXmlGenerator.java