mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-08-07 04:24:45 +00:00
del[net]: remove methods that are not used
This commit is contained in:
@@ -24,7 +24,6 @@ import io.netty.channel.epoll.EpollServerSocketChannel;
|
||||
import io.netty.channel.nio.NioEventLoopGroup;
|
||||
import io.netty.channel.socket.nio.NioServerSocketChannel;
|
||||
import io.netty.util.concurrent.DefaultThreadFactory;
|
||||
import io.netty.util.concurrent.EventExecutorGroup;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -122,21 +121,6 @@ public abstract class AbstractServer<C extends Channel> extends ChannelInitializ
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized static void shutdownEventLoopGracefully(EventExecutorGroup executor) {
|
||||
if (executor == null) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
if (!executor.isTerminated()) {
|
||||
executor.shutdownGracefully();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("EventLoop Thread pool [{}] is failed to shutdown! ", executor, e);
|
||||
return;
|
||||
}
|
||||
logger.info("EventLoop Thread pool [{}] shutdown gracefully.", executor);
|
||||
}
|
||||
|
||||
public synchronized static void shutdownAllServers() {
|
||||
allServers.forEach(it -> it.shutdown());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user