private void setPrimaryMember(InternalDistributedMember id) {
    if (!getDistributionManager().getId().equals(id)) {
      // volunteerForPrimary handles primary state change if its our id
      if (isHosting()) {
        requestPrimaryState(OTHER_PRIMARY_HOSTING);
      } else {
        requestPrimaryState(OTHER_PRIMARY_NOT_HOSTING);
      }
    }
    primaryMember.set(id);
    everHadPrimary = true;

    if (id != null && id.equals(primaryElector)) {
      primaryElector = null;
    }
    notifyAll(); // wake up any threads in waitForPrimaryMember
  }
Sets primaryMember and notifies all. Caller must be synced on this.

@param id the member to use as primary for this bucket
geode-core/src/main/java/org/apache/geode/internal/cache/BucketAdvisor.java