List of usage examples for io.netty.channel.kqueue KQueueEventLoopGroup KQueueEventLoopGroup
public KQueueEventLoopGroup(int nThreads, Executor executor)
From source file:dorkbox.network.connection.Shutdownable.java
License:Apache License
/** * Creates a new event loop based on the specified configuration * * @param connectionType LOCAL, NIO, EPOLL, etc... * @param threadCount number of threads for the event loop * * @return a new event loop group based on the specified parameters *//* w ww . java 2 s. c o m*/ protected EventLoopGroup newEventLoop(final ConnectionType connectionType, final int threadCount, final String threadName) { NamedThreadFactory threadFactory = new NamedThreadFactory(threadName, threadGroup); EventLoopGroup group; switch (connectionType) { case LOCAL: group = new DefaultEventLoopGroup(threadCount, threadFactory); break; case OIO: group = new OioEventLoopGroup(threadCount, threadFactory); break; case NIO: group = new NioEventLoopGroup(threadCount, threadFactory); break; case EPOLL: group = new EpollEventLoopGroup(threadCount, threadFactory); break; case KQUEUE: group = new KQueueEventLoopGroup(threadCount, threadFactory); break; default: group = new DefaultEventLoopGroup(threadCount, threadFactory); break; } manageForShutdown(group); return group; }
From source file:io.vertx.core.net.impl.transport.KQueueTransport.java
License:Open Source License
@Override public EventLoopGroup eventLoopGroup(int nThreads, ThreadFactory threadFactory, int ioRatio) { KQueueEventLoopGroup eventLoopGroup = new KQueueEventLoopGroup(nThreads, threadFactory); eventLoopGroup.setIoRatio(ioRatio);// w w w .ja v a 2 s .c om return eventLoopGroup; }
From source file:org.graylog2.inputs.transports.netty.EventLoopGroupFactory.java
License:Open Source License
private EventLoopGroup kqueueEventLoopGroup(int numThreads, Executor executor) { return new KQueueEventLoopGroup(numThreads, executor); }