Class SequentialDnsServerAddressStream
java.lang.Object
io.netty.resolver.dns.SequentialDnsServerAddressStream
- All Implemented Interfaces:
DnsServerAddressStream
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSequentialDnsServerAddressStream(List<? extends InetSocketAddress> addresses, int startIdx) -
Method Summary
Modifier and TypeMethodDescriptionDuplicate this object.next()Retrieves the next DNS server address from the stream.intsize()Get the number of timesDnsServerAddressStream.next()will return a distinct element before repeating or terminating.toString()(package private) static StringtoString(String type, int index, Collection<? extends InetSocketAddress> addresses)
-
Field Details
-
addresses
-
i
private int i
-
-
Constructor Details
-
SequentialDnsServerAddressStream
SequentialDnsServerAddressStream(List<? extends InetSocketAddress> addresses, int startIdx)
-
-
Method Details
-
next
Description copied from interface:DnsServerAddressStreamRetrieves the next DNS server address from the stream.- Specified by:
nextin interfaceDnsServerAddressStream
-
size
public int size()Description copied from interface:DnsServerAddressStreamGet the number of timesDnsServerAddressStream.next()will return a distinct element before repeating or terminating.- Specified by:
sizein interfaceDnsServerAddressStream- Returns:
- the number of times
DnsServerAddressStream.next()will return a distinct element before repeating or terminating.
-
duplicate
Description copied from interface:DnsServerAddressStreamDuplicate this object. The result of this should be able to be independently iterated over viaDnsServerAddressStream.next().Note that
isn't used because it may make sense for some implementations to have the following relationshipinvalid reference
#clone()x.duplicate() == x.- Specified by:
duplicatein interfaceDnsServerAddressStream- Returns:
- A duplicate of this object.
-
toString
-
toString
-