Search in sources :

Example 1 with SocketSelectorEventLoopGroup

use of com.generallycloud.baseio.component.SocketSelectorEventLoopGroup in project baseio by generallycloud.

the class NioSocketChannelAcceptor method initSelectorLoops.

private void initSelectorLoops() {
    // FIXME socket selector event loop ?
    ServerConfiguration configuration = getContext().getServerConfiguration();
    String eventLoopName = "nio-process(tcp-" + configuration.getSERVER_PORT() + ")";
    int core_size = configuration.getSERVER_CORE_SIZE();
    this.selectorEventLoopGroup = new SocketSelectorEventLoopGroup((NioSocketChannelContext) getContext(), eventLoopName, core_size);
    LifeCycleUtil.start(selectorEventLoopGroup);
}
Also used : ServerConfiguration(com.generallycloud.baseio.configuration.ServerConfiguration) SocketSelectorEventLoopGroup(com.generallycloud.baseio.component.SocketSelectorEventLoopGroup) NioSocketChannelContext(com.generallycloud.baseio.component.NioSocketChannelContext)

Example 2 with SocketSelectorEventLoopGroup

use of com.generallycloud.baseio.component.SocketSelectorEventLoopGroup in project baseio by generallycloud.

the class NioSocketChannelConnector method initSelectorLoops.

private void initSelectorLoops() {
    // FIXME socket selector event loop ?
    ServerConfiguration configuration = getContext().getServerConfiguration();
    String eventLoopName = "nio-process(tcp-" + configuration.getSERVER_PORT() + ")";
    int core_size = configuration.getSERVER_CORE_SIZE();
    this.selectorEventLoopGroup = new SocketSelectorEventLoopGroup(getContext(), eventLoopName, core_size);
    LifeCycleUtil.start(selectorEventLoopGroup);
}
Also used : ServerConfiguration(com.generallycloud.baseio.configuration.ServerConfiguration) SocketSelectorEventLoopGroup(com.generallycloud.baseio.component.SocketSelectorEventLoopGroup)

Aggregations

SocketSelectorEventLoopGroup (com.generallycloud.baseio.component.SocketSelectorEventLoopGroup)2 ServerConfiguration (com.generallycloud.baseio.configuration.ServerConfiguration)2 NioSocketChannelContext (com.generallycloud.baseio.component.NioSocketChannelContext)1