driver-core/src/main/com/mongodb/connection/ConnectionId.java
public ConnectionId withServerValue(final int serverValue) {
        isTrue("server value is null", this.serverValue == null);
        return new ConnectionId(serverId, localValue, serverValue);
    }
public ConnectionId withServerValue(final int serverValue) {
        isTrue("server value is null", this.serverValue == null);
        return new ConnectionId(serverId, localValue, serverValue);
    }
Creates a new connectionId with the set server value

@param serverValue the server value
@return the new connection id
@since 3.8