软件包 | 描述 |
---|---|
io.netty.channel |
核心频道API是异步和事件驱动的各种传输的抽象,如
NIO Channel 。
|
io.netty.channel.embedded |
一个虚拟的 Channel ,它帮助包装一系列处理程序来单元测试处理程序或在非I / O上下文中使用它们。
|
io.netty.channel.epoll |
针对Linux的优化传输,使用
EPOLL Edge-Triggered Mode获得最高性能。
|
io.netty.channel.kqueue |
BSD专用运输。
|
io.netty.channel.local |
一种虚拟传输,可在同一虚拟机中实现双方之间的通信。
|
io.netty.channel.nio |
基于
NIO的通道API实现 - 推荐用于大量连接(> = 1000)。
|
io.netty.channel.oio |
旧阻止基于I / O的通道API实现 - 建议用于少量连接(<1000)。
|
io.netty.resolver.dns |
Java的内置域名查找机制的一种替代方法,可以异步解析域名,同样支持任意DNS记录类型的查询。
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractEventLoop
骨架实施 EventLoop 。
|
class |
DefaultEventLoop |
class |
SingleThreadEventLoop
EventLoop 的抽象基类,它在单个线程中执行其所有提交的任务。
|
class |
ThreadPerChannelEventLoop
|
Modifier and Type | Method and Description |
---|---|
EventLoop |
Channel.eventLoop()
|
EventLoop |
AbstractChannel.eventLoop() |
protected abstract EventLoop |
MultithreadEventLoopGroup.newChild(java.util.concurrent.Executor executor, java.lang.Object... args) |
protected EventLoop |
DefaultEventLoopGroup.newChild(java.util.concurrent.Executor executor, java.lang.Object... args) |
protected EventLoop |
ThreadPerChannelEventLoopGroup.newChild(java.lang.Object... args)
创建一个新的 EventLoop 。
|
EventLoop |
ThreadPerChannelEventLoopGroup.next() |
EventLoop |
SingleThreadEventLoop.next() |
EventLoop |
MultithreadEventLoopGroup.next() |
EventLoop |
EventLoopGroup.next()
返回下一个 EventLoop 使用
|
abstract EventLoop |
AbstractEventLoopGroup.next() |
EventLoop |
AbstractEventLoop.next() |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
AbstractChannel.isCompatible(EventLoop loop)
如果给定的 EventLoop 与此实例兼容,则返回true 。
|
void |
Channel.Unsafe.register(EventLoop eventLoop, ChannelPromise promise)
注册 ChannelPromise 的Channel ,并在注册完成后通知ChannelFuture 。
|
void |
AbstractChannel.AbstractUnsafe.register(EventLoop eventLoop, ChannelPromise promise) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
EmbeddedChannel.isCompatible(EventLoop loop) |
Modifier and Type | Method and Description |
---|---|
protected EventLoop |
EpollEventLoopGroup.newChild(java.util.concurrent.Executor executor, java.lang.Object... args) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
EpollServerSocketChannel.isCompatible(EventLoop loop) |
protected boolean |
AbstractEpollServerChannel.isCompatible(EventLoop loop) |
Modifier and Type | Method and Description |
---|---|
protected EventLoop |
KQueueEventLoopGroup.newChild(java.util.concurrent.Executor executor, java.lang.Object... args) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
KQueueServerSocketChannel.isCompatible(EventLoop loop) |
protected boolean |
AbstractKQueueServerChannel.isCompatible(EventLoop loop) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
LocalServerChannel.isCompatible(EventLoop loop) |
protected boolean |
LocalChannel.isCompatible(EventLoop loop) |
Modifier and Type | Class and Description |
---|---|
class |
NioEventLoop
SingleThreadEventLoop 执行哪一个寄存器的Channel “s到一个Selector 也是如此在事件循环的这些多路复用。
|
Modifier and Type | Method and Description |
---|---|
protected EventLoop |
NioEventLoopGroup.newChild(java.util.concurrent.Executor executor, java.lang.Object... args) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
AbstractNioChannel.isCompatible(EventLoop loop) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
AbstractOioChannel.isCompatible(EventLoop loop) |
Modifier and Type | Method and Description |
---|---|
protected EventLoop |
DnsNameResolver.executor() |
Modifier and Type | Method and Description |
---|---|
DnsCacheEntry |
NoopDnsCache.cache(java.lang.String hostname, DnsRecord[] additional, java.net.InetAddress address, long originalTtl, EventLoop loop) |
DnsCacheEntry |
DnsCache.cache(java.lang.String hostname, DnsRecord[] additionals, java.net.InetAddress address, long originalTtl, EventLoop loop)
创建一个新的 DnsCacheEntry 并缓存给定主机名的解析地址。
|
DnsCacheEntry |
DefaultDnsCache.cache(java.lang.String hostname, DnsRecord[] additionals, java.net.InetAddress address, long originalTtl, EventLoop loop) |
DnsCacheEntry |
NoopDnsCache.cache(java.lang.String hostname, DnsRecord[] additional, java.lang.Throwable cause, EventLoop loop) |
DnsCacheEntry |
DnsCache.cache(java.lang.String hostname, DnsRecord[] additionals, java.lang.Throwable cause, EventLoop loop)
缓存给定主机名的解析失败。
|
DnsCacheEntry |
DefaultDnsCache.cache(java.lang.String hostname, DnsRecord[] additionals, java.lang.Throwable cause, EventLoop loop) |
protected AddressResolver<java.net.InetSocketAddress> |
RoundRobinDnsAddressResolverGroup.newAddressResolver(EventLoop eventLoop, NameResolver<java.net.InetAddress> resolver)
我们需要重写此方法,而不是
DnsAddressResolverGroup.newNameResolver(EventLoop, ChannelFactory, DnsServerAddressStreamProvider) ,因为我们需要消除可能缓存
NameResolver.resolve(java.lang.String) 通过
InflightNameResolver 中创建
DnsAddressResolverGroup.newResolver(EventLoop, ChannelFactory, DnsServerAddressStreamProvider) 。
|
protected AddressResolver<java.net.InetSocketAddress> |
DnsAddressResolverGroup.newAddressResolver(EventLoop eventLoop, NameResolver<java.net.InetAddress> resolver)
创建一个新的 AddressResolver 。
|
protected NameResolver<java.net.InetAddress> |
DnsAddressResolverGroup.newNameResolver(EventLoop eventLoop, ChannelFactory<? extends DatagramChannel> channelFactory, DnsServerAddressStreamProvider nameServerProvider)
创建一个新的 NameResolver 。
|
protected AddressResolver<java.net.InetSocketAddress> |
DnsAddressResolverGroup.newResolver(EventLoop eventLoop, ChannelFactory<? extends DatagramChannel> channelFactory, DnsServerAddressStreamProvider nameServerProvider)
|
Constructor and Description |
---|
DnsNameResolver(EventLoop eventLoop, ChannelFactory<? extends DatagramChannel> channelFactory, DnsCache resolveCache, DnsCache authoritativeDnsServerCache, DnsQueryLifecycleObserverFactory dnsQueryLifecycleObserverFactory, long queryTimeoutMillis, ResolvedAddressTypes resolvedAddressTypes, boolean recursionDesired, int maxQueriesPerResolve, boolean traceEnabled, int maxPayloadSize, boolean optResourceEnabled, HostsFileEntriesResolver hostsFileEntriesResolver, DnsServerAddressStreamProvider dnsServerAddressStreamProvider, java.lang.String[] searchDomains, int ndots, boolean decodeIdn)
创建一个与指定的DNS服务器列表通信的新的基于DNS的名称解析器。
|
DnsNameResolverBuilder(EventLoop eventLoop)
创建一个新的构建器。
|
Copyright © 2008–2018 The Netty Project. All rights reserved.