浏览代码

优化ggame、gcenter

johnclot69 4 月之前
父节点
当前提交
542581e35c

+ 2 - 2
incubator-center/src/main/java/com/incubator/center/GCenter.java

@@ -28,6 +28,8 @@ import java.util.concurrent.TimeUnit;
 public class GCenter extends AbstractService {
 
 	private static final Logger logger;
+
+	public static ScheduledThreadPoolExecutor scheduleExec = new ScheduledThreadPoolExecutor(2, new NamedThreadFactory("taskTimer", true));
 	/** 运行环境 **/
 	public static final Environment env = Environment.getInstance();
 	/** 服务器设置目录 **/
@@ -46,8 +48,6 @@ public class GCenter extends AbstractService {
 	/** 绑定的http 端口 **/
 	public static int BIND_HTTP_PORT = 4001;
 
-	public ScheduledThreadPoolExecutor scheduleExec = new ScheduledThreadPoolExecutor(2, new NamedThreadFactory("taskTimer", true));
-
 	public static HashMap<Integer, NetHandler> handlers = new HashMap<>();
 
 	private static volatile GCenter instance;

+ 1 - 2
incubator-game/src/main/java/com/incubator/game/GGame.java

@@ -50,9 +50,7 @@ public class GGame extends AbstractService {
     public static ScheduledThreadPoolExecutor scheduleExec = new ScheduledThreadPoolExecutor(2, new NamedThreadFactory("ServerExecutor", true));
     /** 运行环境 **/
     public static final Environment env = Environment.getInstance();
-
     private static final LSDBHandler lsDBHandler = new LSDBHandler();
-
     /** 服务器设置目录 **/
     public static PropertiesUtil SERVER_SETTINGS;
     public static PropertiesUtil DB_SETTINGS;
@@ -89,6 +87,7 @@ public class GGame extends AbstractService {
 
     public static volatile int APP_TIME_SEC = (int) (APP_TIME / 1000);
 
+
     /** 是否注册中控 **/
     public static boolean isRegCenter;