selectHost<T extends Host> method

  1. @visibleForOverriding
T selectHost<T extends Host>(
  1. HostType type,
  2. List<T> hosts
)

Returns preferred host of given type from hosts list.

Overload this function if you want to implement custom host preference.

By default returns first host in a list.

Implementation

@visibleForOverriding
T selectHost<T extends Host>(HostType type, List<T> hosts) =>
  hosts.first;