@UnstableApi public abstract class AddressResolverGroup<T extends SocketAddress> extends Object implements Closeable
NameResolver
s 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
NameResolver s 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
.Exception
public void close()
NameResolver
s created by this group.close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2008–2019 The Netty Project. All rights reserved.