Sfoglia il codice sorgente

暂时屏蔽epoll打印

johnclot69 3 mesi fa
parent
commit
006763bd95

+ 11 - 11
incubator-common/src/main/java/com/incubator/common/net/netty/server/NettyServer.java

@@ -175,11 +175,10 @@ public class NettyServer extends NettyServerFactory {
 	 * 获取默认的 Channel 类型
 	 */
 	private Class<? extends ServerChannel> getDefaultChannelClass() {
-		System.out.println("Epoll is supported:=====================================================> " + Epoll.isAvailable());
-		if (!Epoll.isAvailable()) {
-			System.out.println("Epoll unavailable cause: ===========================================>" + Epoll.unavailabilityCause());
-		}
-
+//		System.out.println("Epoll is supported:=====================================================> " + Epoll.isAvailable());
+//		if (!Epoll.isAvailable()) {
+//			System.out.println("Epoll unavailable cause: ===========================================>" + Epoll.unavailabilityCause());
+//		}
 
 		String osName = System.getProperty("os.name").toLowerCase();
 		if (osName.contains("linux")) {
@@ -187,10 +186,11 @@ public class NettyServer extends NettyServerFactory {
 		}
 		return NioServerSocketChannel.class;
 	}
-	public static void main(String[] args) {
-		System.out.println("Epoll is supported: " + Epoll.isAvailable());
-		if (!Epoll.isAvailable()) {
-			System.out.println("Epoll unavailable cause: " + Epoll.unavailabilityCause());
-		}
-	}
+
+//	public static void main(String[] args) {
+//		System.out.println("Epoll is supported: " + Epoll.isAvailable());
+//		if (!Epoll.isAvailable()) {
+//			System.out.println("Epoll unavailable cause: " + Epoll.unavailabilityCause());
+//		}
+//	}
 }