Search in sources :

Example 1 with RedisChannelInitializer

use of org.redisson.client.handler.RedisChannelInitializer in project redisson by redisson.

the class RedisClient method createBootstrap.

private Bootstrap createBootstrap(RedisClientConfig config, Type type) {
    Bootstrap bootstrap = new Bootstrap().resolver(config.getResolverGroup()).channel(config.getSocketChannelClass()).group(config.getGroup());
    bootstrap.handler(new RedisChannelInitializer(bootstrap, config, this, channels, type));
    bootstrap.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, config.getConnectTimeout());
    bootstrap.option(ChannelOption.SO_KEEPALIVE, config.isKeepAlive());
    bootstrap.option(ChannelOption.TCP_NODELAY, config.isTcpNoDelay());
    config.getNettyHook().afterBoostrapInitialization(bootstrap);
    return bootstrap;
}
Also used : Bootstrap(io.netty.bootstrap.Bootstrap) RedisChannelInitializer(org.redisson.client.handler.RedisChannelInitializer)

Aggregations

Bootstrap (io.netty.bootstrap.Bootstrap)1 RedisChannelInitializer (org.redisson.client.handler.RedisChannelInitializer)1