public interface AddressResolver
Modifier and Type | Method and Description |
---|---|
List<Address> |
getAddresses()
Get the potential
Address es to connect to. |
default List<Address> |
maybeShuffle(List<Address> input)
Optionally shuffle the list of addresses returned by
getAddresses() . |
List<Address> getAddresses() throws IOException
Address
es to connect to.Address
esIOException
- if it encounters a problemdefault List<Address> maybeShuffle(List<Address> input)
getAddresses()
.
The automatic connection recovery calls this method after getAddresses()
to pick a
random address for reconnecting.
The default method implementation calls Collections.shuffle(List)
. Custom
implementations can choose to not do any shuffling to have more predictability in the
reconnection.
input
- Copyright © 2022 VMware, Inc. or its affiliates.. All rights reserved.