@UnstableApi public abstract class AddressResolverGroup<T extends SocketAddress> extends Object implements Closeable
NameResolvers so that each EventExecutor has its own resolver instance.| Modifier | Constructor and Description |
|---|---|
protected |
AddressResolverGroup() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes all
NameResolvers created by this group. |
AddressResolver<T> |
getResolver(io.netty.util.concurrent.EventExecutor executor)
Returns the
AddressResolver associated with the specified EventExecutor. |
protected abstract AddressResolver<T> |
newResolver(io.netty.util.concurrent.EventExecutor executor)
Invoked by
getResolver(EventExecutor) to create a new AddressResolver. |
public AddressResolver<T> getResolver(io.netty.util.concurrent.EventExecutor executor)
AddressResolver associated with the specified EventExecutor. If there's no associated
resolved found, this method creates and returns a new resolver instance created by
newResolver(EventExecutor) so that the new resolver is reused on another
getResolver(EventExecutor) call with the same EventExecutor.protected abstract AddressResolver<T> newResolver(io.netty.util.concurrent.EventExecutor executor) throws Exception
getResolver(EventExecutor) to create a new AddressResolver.Exceptionpublic void close()
NameResolvers created by this group.close in interface Closeableclose in interface AutoCloseableCopyright © 2008–2019 The Netty Project. All rights reserved.