@Override
  public Object executeOnPrimary(final Op op) {
    if (queueManager == null) {
      throw new SubscriptionNotEnabledException();
    }

    final HashSet<ServerLocation> attemptedPrimaries = new HashSet<>();
    while (true) {
      final Connection primary = queueManager.getAllConnections().getPrimary();
      try {
        return executeWithPossibleReAuthentication(primary, op);
      } catch (final Exception e) {
        boolean finalAttempt = !attemptedPrimaries.add(primary.getServer());
        handleException(e, primary, 0, finalAttempt);
        // we shouldn't reach this code, but just in case
        if (finalAttempt) {
          throw new ServerConnectivityException("Tried the same primary server twice.", e);
        }
      }
    }
  }
execute the given op on the given server. If the server cannot be reached, sends a
TXFailoverOp, then retries the given op

@param loc the server to execute the op on
@param op the op to execute
@return the result of execution
geode-core/src/main/java/org/apache/geode/cache/client/internal/OpExecutorImpl.java