mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-19 16:16:19 +00:00
del[net]: remove methods that are not used
This commit is contained in:
1 parent
758b12f583
commit
2df2f31e62
1 file changed
-16
@@ -24,7 +24,6 @@ import io.netty.channel.epoll.EpollServerSocketChannel;
|
|||||||
import io.netty.channel.nio.NioEventLoopGroup;
|
import io.netty.channel.nio.NioEventLoopGroup;
|
||||||
import io.netty.channel.socket.nio.NioServerSocketChannel;
|
import io.netty.channel.socket.nio.NioServerSocketChannel;
|
||||||
import io.netty.util.concurrent.DefaultThreadFactory;
|
import io.netty.util.concurrent.DefaultThreadFactory;
|
||||||
import io.netty.util.concurrent.EventExecutorGroup;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
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() {
|
public synchronized static void shutdownAllServers() {
|
||||||
allServers.forEach(it -> it.shutdown());
|
allServers.forEach(it -> it.shutdown());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user