public void volunteerForPrimary() {
    InternalDistributedMember elector = primaryElector;
    if (elector != null && regionAdvisor.hasPartitionedRegion(elector)) {
      // another server will determine the primary node
      return;
    }

    primaryElector = null;

    initializationGate();

    synchronized (this) {
      if (isVolunteering() || isClosed() || !isHosting()) {
        // only one thread should be attempting to volunteer at one time
        return;
      }

      if (volunteeringDelegate == null) {
        setVolunteeringDelegate(new VolunteeringDelegate());
      }
      volunteeringDelegate.volunteerForPrimary();

    }
  }
Attempt to acquire lock for primary until a primary exists. Caller hands off responsibility to
an executor (waiting pool) and returns early.
geode-core/src/main/java/org/apache/geode/internal/cache/BucketAdvisor.java