接口的使用
cn.wjybxx.concurrent.EventLoop
使用EventLoop的程序包
-
cn.wjybxx.concurrent中EventLoop的使用
类型参数类型为EventLoop的cn.wjybxx.concurrent中的字段修饰符和类型方法说明abstract EventLoopEventLoopBuilder.build()EventLoopFactory.newChild(EventLoopGroup parent, int index, Object extraInfo) AbstractEventLoop.select()AbstractEventLoop.select(int key) DefaultFixedEventLoopGroup.select()DefaultFixedEventLoopGroup.select(int key) default EventLoopEventLoop.select()default EventLoopEventLoop.select(int key) EventLoopChooser.select()按默认规则分配一个EventLoopEventLoopChooser.select(int key) 通过给定键选择一个EventLoopEventLoopGroup.select()选择一个EventLoop用于接下来的任务调度FixedEventLoopGroup.select(int key) 返回变量类型为EventLoop的类型的cn.wjybxx.concurrent中的方法修饰符和类型方法说明AbstractEventLoop.iterator()DefaultFixedEventLoopGroup.iterator()EventLoopGroup.iterator()注意;如果包含不定数量的EventLoop,返回的是快照。final Spliterator<EventLoop> AbstractEventLoop.spliterator()DefaultFixedEventLoopGroup.spliterator()参数类型为EventLoop的cn.wjybxx.concurrent中的方法修饰符和类型方法说明voidvoid在构造EventLoop的过程中将调用该方法注入实例 注意:此时EventLoop可能尚未完全初始化!DefaultChooserFactory.newChooser(EventLoop[] children) EventLoopChooserFactory.newChooser(EventLoop[] children) static cn.wjybxx.base.time.CachedTimeProviderFutureUtils.newTimeProvider(EventLoop eventLoop) static cn.wjybxx.base.time.CachedTimeProviderFutureUtils.newTimeProvider(EventLoop eventLoop, long curTime) 创建一个支持缓存的时间提供器,且可以多线程安全访问。voidstatic <V> IPromise<V> FutureUtils.toEventLoopPromise(EventLoop eventLoop, ICompletionStage<V> input) 类型变量类型为EventLoop的cn.wjybxx.concurrent中的方法参数