java.lang.Object
cn.wjybxx.concurrent.EventLoopBuilder<T>
- 类型参数:
T- 内部事件类型
- 作者:
- wjybxx date 2023/4/11
-
嵌套类概要
嵌套类 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明abstract EventLoopbuild()EventLoopAgent<? super T> getAgent()EventLoop的内部代理int每次最多处理多少个事件就尝试执行一次EventLoopAgent.update()方法 该值越小:线程间的同步开销越多;越不容易阻塞生产者(有界Buffer);EventLoop更容易响应取消; 该值越大:消费者的吞吐量越好,生产者的吞吐量则会降低(有界Buffer);EventLoop对关闭信号的响应越慢。EventLoop的主模块static <T extends IAgentEvent>
EventLoopBuilder.DisruptorBuilder<T> static <T extends IAgentEvent>
EventLoopBuilder.DisruptorBuilder<T> newDisruptBuilder(EventSequencer<? extends T> eventSequencer) setAgent(EventLoopAgent<? super T> agent) setBatchSize(int batchSize) setMainModule(EventLoopModule mainModule) setParent(EventLoopGroup parent) setRejectedExecutionHandler(RejectedExecutionHandler rejectedExecutionHandler) setThreadFactory(ThreadFactory threadFactory)
-
构造器详细资料
-
EventLoopBuilder
public EventLoopBuilder()
-
-
方法详细资料
-
build
-
getParent
-
setParent
-
getThreadFactory
-
setThreadFactory
-
getRejectedExecutionHandler
-
setRejectedExecutionHandler
public EventLoopBuilder<T> setRejectedExecutionHandler(RejectedExecutionHandler rejectedExecutionHandler) -
getAgent
EventLoop的内部代理 -
setAgent
-
getMainModule
EventLoop的主模块 -
setMainModule
-
getBatchSize
public int getBatchSize()每次最多处理多少个事件就尝试执行一次EventLoopAgent.update()方法 该值越小:线程间的同步开销越多;越不容易阻塞生产者(有界Buffer);EventLoop更容易响应取消; 该值越大:消费者的吞吐量越好,生产者的吞吐量则会降低(有界Buffer);EventLoop对关闭信号的响应越慢。 -
setBatchSize
-
newDisruptBuilder
-
newDisruptBuilder
public static <T extends IAgentEvent> EventLoopBuilder.DisruptorBuilder<T> newDisruptBuilder(EventSequencer<? extends T> eventSequencer)
-