code: @SuppressWarnings("deprecation")
      @Nullable
      public ServerAddress getMaster() {
          List<ServerDescription> primaries = getClusterDescription().getPrimaries();
          return primaries.isEmpty() ? null : primaries.get(0).getAddress();
      }
docs: Gets the ServerAddress of the master server in this replica set.
  
  @return master or null if don't have one
  @throws MongoException if there's a failure