next

abstract fun next(size: Int): Int

Return the index of the next endpoint to use.

Called under the ServerClusterReconnect lock — must NOT suspend.

Return

index in [0, size).

Parameters

size

total number of endpoints (always ≥ 1).