public void launchLockObtainingVolunteerThread() {
    String threadName = "Gateway Sender Primary Lock Acquisition Thread Volunteer";
    lockObtainingThread = new LoggingThread(threadName, () -> {
      sender.getLifeCycleLock().readLock().lock();
      try {
        // Attempt to obtain the lock
        if (!(sender.isRunning())) {
          return;
        }
        if (logger.isDebugEnabled()) {
          logger.debug("{}: Obtaining the lock on {}", this, lockToken);
        }

        if (volunteerForPrimary()) {
          if (logger.isDebugEnabled()) {
            logger.debug("{}: Obtained the lock on {}", this,
                lockToken);
          }
          logger.info("{} is becoming primary gateway Sender.", this);

          // As soon as the lock is obtained, set primary
          makePrimary();
        }
      } catch (CancelException e) {
        // no action necessary
      } catch (Exception e) {
        if (!sender.getStopper().isCancelInProgress()) {
          logger.fatal(String.format(
              "%s: The thread to obtain the failover lock was interrupted. This gateway sender will never become the primary.",
              this),
              e);
        }
      } finally {
        sender.getLifeCycleLock().readLock().unlock();
      }
    });
    lockObtainingThread.start();
  }
Find out if this sender is the eldest in the DS. Returns true if: 1. No other sender is running
2. At least one sender is running in the system apart from this sender AND this sender's start
time is lesser of all (i.e. this sender is oldest)

@return boolean true if this eldest sender; false otherwise
geode-core/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderAdvisor.java