本文整理汇总了Java中com.alibaba.dubbo.common.utils.ExecutorUtil类的典型用法代码示例。如果您正苦于以下问题:Java ExecutorUtil类的具体用法?Java ExecutorUtil怎么用?Java ExecutorUtil使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ExecutorUtil类属于com.alibaba.dubbo.common.utils包,在下文中一共展示了ExecutorUtil类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: close
import com.alibaba.dubbo.common.utils.ExecutorUtil; //导入依赖的package包/类
public void close() {
if (logger.isInfoEnabled()) {
logger.info("Close " + getClass().getSimpleName() + " bind " + bindAddress + ", export " + getLocalAddress());
}
ExecutorUtil.shutdownNow(executor ,100);
closed = true;
try {
doClose();
} catch (Throwable e) {
logger.warn(e.getMessage(), e);
}
}
示例2: NettyServer
import com.alibaba.dubbo.common.utils.ExecutorUtil; //导入依赖的package包/类
public NettyServer(URL url, ChannelHandler handler) throws RemotingException{
super(url, ChannelHandlers.wrap(handler, ExecutorUtil.setThreadName(url, SERVER_THREAD_POOL_NAME)));
}
示例3: wrapChannelHandler
import com.alibaba.dubbo.common.utils.ExecutorUtil; //导入依赖的package包/类
protected static ChannelHandler wrapChannelHandler(URL url, ChannelHandler handler){
url = ExecutorUtil.setThreadName(url, CLIENT_THREAD_POOL_NAME);
url = url.addParameterIfAbsent(Constants.THREADPOOL_KEY, Constants.DEFAULT_CLIENT_THREADPOOL);
return ChannelHandlers.wrap(handler, url);
}
示例4: close
import com.alibaba.dubbo.common.utils.ExecutorUtil; //导入依赖的package包/类
public void close(int timeout) {
ExecutorUtil.gracefulShutdown(executor ,timeout);
close();
}
示例5: MinaServer
import com.alibaba.dubbo.common.utils.ExecutorUtil; //导入依赖的package包/类
public MinaServer(URL url, ChannelHandler handler) throws RemotingException{
super(url, ChannelHandlers.wrap(handler, ExecutorUtil.setThreadName(url, SERVER_THREAD_POOL_NAME)));
}