private ApplicationVM[] listApplications(boolean disconnected) {
    if (isConnected() || !membersMap.isEmpty() && disconnected) {
      // removed synchronization on members...
      Collection<RemoteApplicationVM> remoteApplicationVMs = new ArrayList<>(membersMap.size());
      VMS: for (Future<RemoteApplicationVM> future : membersMap.values()) {
        for (;;) {
          try {
            system.getCancelCriterion().checkCancelInProgress(null);
          } catch (DistributedSystemDisconnectedException de) {
            // ignore during forced disconnect
          }
          boolean interrupted = Thread.interrupted();
          try {
            RemoteApplicationVM app = future.get();
            if (app != null) {
              remoteApplicationVMs.add(app);
            }
            break;
          } catch (InterruptedException ex) {
            interrupted = true;
          } catch (CancellationException ex) {
            continue VMS;
          } catch (ExecutionException ex) {
            handle(ex);
            continue VMS;
          } finally {
            if (interrupted) {
              Thread.currentThread().interrupt();
            }
          }
        }
      }

      RemoteApplicationVM[] array = new RemoteApplicationVM[remoteApplicationVMs.size()];
      remoteApplicationVMs.toArray(array);
      return array;

    }
    return new RemoteApplicationVM[0];
  }
Returns whether or not this manager agent has created admin objects for the initial members of
the distributed system.

@since GemFire 4.0
geode-core/src/main/java/org/apache/geode/internal/admin/remote/RemoteGfManagerAgent.java