Package io.netty.resolver.dns
Class InflightNameResolver<T>
java.lang.Object
io.netty.resolver.dns.InflightNameResolver<T>
- All Implemented Interfaces:
NameResolver<T>
,Closeable
,AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final NameResolver
<T> private final EventExecutor
private final ConcurrentMap
<String, Promise<List<T>>> private final ConcurrentMap
<String, Promise<T>> -
Constructor Summary
ConstructorsConstructorDescriptionInflightNameResolver
(EventExecutor executor, NameResolver<T> delegate, ConcurrentMap<String, Promise<T>> resolvesInProgress, ConcurrentMap<String, Promise<List<T>>> resolveAllsInProgress) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes all the resources allocated and used by this resolver.Resolves the specified name into an address.Resolves the specified name into an address.private <U> Promise
<U> resolve
(ConcurrentMap<String, Promise<U>> resolveMap, String inetHost, Promise<U> promise, boolean resolveAll) resolveAll
(String inetHost) Resolves the specified host name and port into a list of address.resolveAll
(String inetHost, Promise<List<T>> promise) Resolves the specified host name and port into a list of address.toString()
private static <T> void
transferResult
(Future<T> src, Promise<T> dst)
-
Field Details
-
executor
-
delegate
-
resolvesInProgress
-
resolveAllsInProgress
-
-
Constructor Details
-
InflightNameResolver
InflightNameResolver(EventExecutor executor, NameResolver<T> delegate, ConcurrentMap<String, Promise<T>> resolvesInProgress, ConcurrentMap<String, Promise<List<T>>> resolveAllsInProgress)
-
-
Method Details
-
resolve
Description copied from interface:NameResolver
Resolves the specified name into an address.- Specified by:
resolve
in interfaceNameResolver<T>
- Parameters:
inetHost
- the name to resolve- Returns:
- the address as the result of the resolution
-
resolveAll
Description copied from interface:NameResolver
Resolves the specified host name and port into a list of address.- Specified by:
resolveAll
in interfaceNameResolver<T>
- Parameters:
inetHost
- the name to resolve- Returns:
- the list of the address as the result of the resolution
-
close
public void close()Description copied from interface:NameResolver
Closes all the resources allocated and used by this resolver.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceNameResolver<T>
-
resolve
Description copied from interface:NameResolver
Resolves the specified name into an address.- Specified by:
resolve
in interfaceNameResolver<T>
- Parameters:
inetHost
- the name to resolvepromise
- thePromise
which will be fulfilled when the name resolution is finished- Returns:
- the address as the result of the resolution
-
resolveAll
Description copied from interface:NameResolver
Resolves the specified host name and port into a list of address.- Specified by:
resolveAll
in interfaceNameResolver<T>
- Parameters:
inetHost
- the name to resolvepromise
- thePromise
which will be fulfilled when the name resolution is finished- Returns:
- the list of the address as the result of the resolution
-
resolve
-
transferResult
-
toString
-