コード例 #1
0
 public AsyncInvokerHandle() {
   try {
     httpThreadLocal = HttpThreadLocal.getInstance();
     int workerCount = Global.getSingleton().getServiceConfig().getInt("gaea.async.worker.count");
     if (workerCount > 0) {
       asyncInvoker = AsyncInvoker.getInstance(workerCount);
     } else {
       asyncInvoker = AsyncInvoker.getInstance();
     }
     String sTaskTimeOut =
         Global.getSingleton().getServiceConfig().getString("gaea.server.tcp.task.timeout");
     if (sTaskTimeOut != null && !"".equals(sTaskTimeOut)) {
       taskTimeOut = Integer.parseInt(sTaskTimeOut);
     }
     logger.info("async worker count:" + workerCount);
   } catch (Exception e) {
     logger.error("init AsyncInvokerHandle error", e);
   }
 }