List of usage examples for io.netty.channel WriteBufferWaterMark DEFAULT
WriteBufferWaterMark DEFAULT
To view the source code for io.netty.channel WriteBufferWaterMark DEFAULT.
Click Source Link
From source file:com.ibasco.agql.core.transport.NettyTransport.java
License:Open Source License
public NettyTransport(ChannelType channelType, ExecutorService executor) { executorService = executor;/*w w w .jav a 2s . co m*/ bootstrap = new Bootstrap(); //Make sure we have a type set if (channelType == null) throw new IllegalStateException("No channel type has been specified"); //Pick the proper event loop group if (eventLoopGroup == null) { eventLoopGroup = createEventLoopGroup(channelType); } //Default Channel Options addChannelOption(ChannelOption.ALLOCATOR, allocator); addChannelOption(ChannelOption.WRITE_BUFFER_WATER_MARK, WriteBufferWaterMark.DEFAULT); addChannelOption(ChannelOption.CONNECT_TIMEOUT_MILLIS, 10000); //Set resource leak detection if debugging is enabled if (log.isDebugEnabled()) ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.ADVANCED); //Initialize bootstrap bootstrap.group(eventLoopGroup).channel(channelType.getChannelClass()); }