|
@@ -15,10 +15,11 @@ import com.persagy.communication.mina.udp.server.UDPServerManager;
|
|
import com.persagy.communication.util.IServerManager;
|
|
import com.persagy.communication.util.IServerManager;
|
|
import com.saga.entity.PointSet;
|
|
import com.saga.entity.PointSet;
|
|
import com.saga.entity.Record;
|
|
import com.saga.entity.Record;
|
|
|
|
+import com.saga.entity.Server;
|
|
import com.saga.util.Constant;
|
|
import com.saga.util.Constant;
|
|
|
|
|
|
-public class CollectThread extends Thread {
|
|
|
|
- private int port = 0;
|
|
|
|
|
|
+public class DownThread extends Thread {
|
|
|
|
+ // private int port = 0;
|
|
// private long getPointList = 0;
|
|
// private long getPointList = 0;
|
|
private Map<String, Long> getPointList = new HashMap<String, Long>();
|
|
private Map<String, Long> getPointList = new HashMap<String, Long>();
|
|
// private String ip = null;
|
|
// private String ip = null;
|
|
@@ -26,44 +27,15 @@ public class CollectThread extends Thread {
|
|
// ArrayList<IServerManager>();
|
|
// ArrayList<IServerManager>();
|
|
private Map<String, IServerManager> serverList = new HashMap<String, IServerManager>();
|
|
private Map<String, IServerManager> serverList = new HashMap<String, IServerManager>();
|
|
|
|
|
|
- public CollectThread(int port) {
|
|
|
|
|
|
+ public DownThread(Server server) {
|
|
try {
|
|
try {
|
|
- // try {
|
|
|
|
- // // this.ip = Constant.getLocalHostLANAddress().getHostAddress()
|
|
|
|
- // // + ":" + Constant.TypePort.get("Down");
|
|
|
|
- //
|
|
|
|
- // } catch (Exception e) {
|
|
|
|
- // // TODO Auto-generated catch block
|
|
|
|
- // // this.ip = "0.0.0.0" + ":" + Constant.TypePort.get("Down");
|
|
|
|
- //
|
|
|
|
- // e.printStackTrace();
|
|
|
|
- // }
|
|
|
|
- this.port = port;
|
|
|
|
- if (Constant.PortCompress == null || !Constant.PortCompress.containsKey(this.port)) {
|
|
|
|
- this.serverList.put("UDP", new UDPServerManager("0.0.0.0", this.port, "utf-8", false, 1000));
|
|
|
|
- this.serverList.put("TCP",
|
|
|
|
- new TCPServerManager("0.0.0.0", this.port, "utf-8", false, 1000, (byte) '(', (byte) ')'));
|
|
|
|
- } else {
|
|
|
|
- if ("true".equalsIgnoreCase(Constant.PortCompress.get(this.port))) {
|
|
|
|
- // this.serverList.put("UDP", new
|
|
|
|
- // UDPServerManager("0.0.0.0",
|
|
|
|
- // this.port, "utf-8", 1000));
|
|
|
|
- this.serverList.put("UDP", new UDPServerManager("0.0.0.0", this.port, "utf-8", true, 1000));
|
|
|
|
- this.serverList.put("TCP",
|
|
|
|
- new TCPServerManager("0.0.0.0", this.port, "utf-8", true, 1000, (byte) '(', (byte) ')'));
|
|
|
|
- } else {
|
|
|
|
- // this.serverList.put("UDP", new
|
|
|
|
- // UDPServerManager("0.0.0.0",
|
|
|
|
- // this.port, "utf-8", 1000));
|
|
|
|
- this.serverList.put("UDP", new UDPServerManager("0.0.0.0", this.port, "utf-8", false, 1000));
|
|
|
|
- this.serverList.put("TCP",
|
|
|
|
- new TCPServerManager("0.0.0.0", this.port, "utf-8", false, 1000, (byte) '(', (byte) ')'));
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ this.serverList.put("UDP", new UDPServerManager(server.IP, server.Port, "utf-8", server.compress, 1000));
|
|
|
|
+ this.serverList.put("TCP", new TCPServerManager(server.IP, server.Port, "utf-8", server.compress, 1000,
|
|
|
|
+ (byte) '(', (byte) ')'));
|
|
|
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
- LogUtil.error("CollectThread.Exception: " + e.toString());
|
|
|
|
- LogUtil.error("CollectThread(" + port + ") failed to excute, exit!");
|
|
|
|
|
|
+ LogUtil.error("DownThread.Exception: " + e.toString());
|
|
|
|
+ LogUtil.error("DownThread(" + server.IP + ":" + server.Port + ") failed to excute, exit!");
|
|
System.exit(0);
|
|
System.exit(0);
|
|
|
|
|
|
}
|
|
}
|
|
@@ -71,9 +43,9 @@ public class CollectThread extends Thread {
|
|
|
|
|
|
public void run() {
|
|
public void run() {
|
|
for (Entry<String, IServerManager> server : this.serverList.entrySet()) {
|
|
for (Entry<String, IServerManager> server : this.serverList.entrySet()) {
|
|
- LogUtil.info("CollectThread(" + this.port + "): " + server.getValue().Name() + " Created ...");
|
|
|
|
|
|
+ LogUtil.info("DownThread(" + server.getValue().Name() + "): " + " Created ...");
|
|
server.getValue().Start();
|
|
server.getValue().Start();
|
|
- LogUtil.info("CollectThread(" + this.port + "): " + server.getValue().Name() + " Starting ...");
|
|
|
|
|
|
+ LogUtil.info("DownThread(" + server.getValue().Name() + "): " + " Starting ...");
|
|
}
|
|
}
|
|
while (true) {
|
|
while (true) {
|
|
try {
|
|
try {
|
|
@@ -82,29 +54,27 @@ public class CollectThread extends Thread {
|
|
// // V1.0点位日志结构
|
|
// // V1.0点位日志结构
|
|
// {
|
|
// {
|
|
// // LogUtil.info(server.getKey() + " " +
|
|
// // LogUtil.info(server.getKey() + " " +
|
|
- // // "CollectThread.handlePacket begin");
|
|
|
|
|
|
+ // // "DownThread.handlePacket begin");
|
|
// this.handlePacket(server.getValue(), p);
|
|
// this.handlePacket(server.getValue(), p);
|
|
// // LogUtil.info(server.getKey() + " " +
|
|
// // LogUtil.info(server.getKey() + " " +
|
|
- // // "CollectThread.handlePacket end");
|
|
|
|
|
|
+ // // "DownThread.handlePacket end");
|
|
// // LogUtil.info(server.getKey() + " " +
|
|
// // LogUtil.info(server.getKey() + " " +
|
|
- // // "CollectThread.handlePointSet begin");
|
|
|
|
|
|
+ // // "DownThread.handlePointSet begin");
|
|
// this.handlePointSet();
|
|
// this.handlePointSet();
|
|
// // LogUtil.info(server.getKey() + " " +
|
|
// // LogUtil.info(server.getKey() + " " +
|
|
- // // "CollectThread.handlePointSet end");
|
|
|
|
|
|
+ // // "DownThread.handlePointSet end");
|
|
// }
|
|
// }
|
|
// V2.0点位日志结构
|
|
// V2.0点位日志结构
|
|
{
|
|
{
|
|
this.handlePacket2(server.getValue(), p);
|
|
this.handlePacket2(server.getValue(), p);
|
|
this.handlePointSet2();
|
|
this.handlePointSet2();
|
|
-
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
Thread.sleep(1L);
|
|
Thread.sleep(1L);
|
|
}
|
|
}
|
|
// Thread.sleep(3L);
|
|
// Thread.sleep(3L);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
// TODO Auto-generated catch block
|
|
// TODO Auto-generated catch block
|
|
- LogUtil.error("CollectThread.run.Exception: " + e.toString());
|
|
|
|
|
|
+ LogUtil.error("DownThread.run.Exception: " + e.toString());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -119,7 +89,7 @@ public class CollectThread extends Thread {
|
|
String address = null;
|
|
String address = null;
|
|
if (ps.sendTime == 0) {
|
|
if (ps.sendTime == 0) {
|
|
address = Constant.Meter_Collector_Control.get(ps.buildingSign + "-" + ps.meterSign);
|
|
address = Constant.Meter_Collector_Control.get(ps.buildingSign + "-" + ps.meterSign);
|
|
- // LogUtil.info("CollectThread.handlePointSet " +
|
|
|
|
|
|
+ // LogUtil.info("DownThread.handlePointSet " +
|
|
// ps.buildingSign + " " + ps.meterSign + "." +
|
|
// ps.buildingSign + " " + ps.meterSign + "." +
|
|
// ps.funcID
|
|
// ps.funcID
|
|
// + " " + address);
|
|
// + " " + address);
|
|
@@ -148,22 +118,21 @@ public class CollectThread extends Thread {
|
|
// Constant.format(new Date()),
|
|
// Constant.format(new Date()),
|
|
// Long.valueOf(ps.ID), "senddownset",
|
|
// Long.valueOf(ps.ID), "senddownset",
|
|
// "processing:sent");
|
|
// "processing:sent");
|
|
- Constant.Insert_agents_ps_virtual_point_log(ps.buildingSignUP, ps.meterSign,
|
|
|
|
- Long.valueOf(ps.funcID), "down", System.currentTimeMillis(),
|
|
|
|
|
|
+ Constant.Insert_ps_virtual_point_log(Constant.Database, ps.buildingSignUP,
|
|
|
|
+ ps.meterSign, Long.valueOf(ps.funcID), "down", Constant.format(new Date()),
|
|
Long.valueOf(ps.ID), "senddownset", "processing:sent");
|
|
Long.valueOf(ps.ID), "senddownset", "processing:sent");
|
|
-
|
|
|
|
server.getValue().AppendToSend(address, new Packet(cmd));
|
|
server.getValue().AppendToSend(address, new Packet(cmd));
|
|
Constant.collectSend += cmd.length();
|
|
Constant.collectSend += cmd.length();
|
|
Constant.pointSetList.get(i).sendTime = System.currentTimeMillis();
|
|
Constant.pointSetList.get(i).sendTime = System.currentTimeMillis();
|
|
// HBaseUtil.BatchInsert_Set1(Constant.agent,
|
|
// HBaseUtil.BatchInsert_Set1(Constant.agent,
|
|
// Constant.BuildingDB.get(ps.buildingSign),
|
|
// Constant.BuildingDB.get(ps.buildingSign),
|
|
// ps);
|
|
// ps);
|
|
- Constant.AgentsBatchInsert_Set1(Constant.BuildingDB.get(ps.buildingSign), ps);
|
|
|
|
|
|
+ Constant.BatchInsert_Set1(Constant.Database, ps);
|
|
LogUtil.info(server.getValue().Name() + " AppendToSend:" + address + " " + cmd);
|
|
LogUtil.info(server.getValue().Name() + " AppendToSend:" + address + " " + cmd);
|
|
break;
|
|
break;
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
// TODO Auto-generated catch block
|
|
// TODO Auto-generated catch block
|
|
- LogUtil.error("CollectThread.handlePointSet.Exception: " + e.toString());
|
|
|
|
|
|
+ LogUtil.error("DownThread.handlePointSet.Exception: " + e.toString());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -175,7 +144,7 @@ public class CollectThread extends Thread {
|
|
}
|
|
}
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
// TODO Auto-generated catch block
|
|
// TODO Auto-generated catch block
|
|
- LogUtil.error("CollectThread.handlePointSet.Exception: " + e.toString());
|
|
|
|
|
|
+ LogUtil.error("DownThread.handlePointSet.Exception: " + e.toString());
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -191,7 +160,7 @@ public class CollectThread extends Thread {
|
|
// if (ps.sendTime == 0) {
|
|
// if (ps.sendTime == 0) {
|
|
// address = Constant.Meter_Collector_Control.get(ps.buildingSign + "-" +
|
|
// address = Constant.Meter_Collector_Control.get(ps.buildingSign + "-" +
|
|
// ps.meterSign);
|
|
// ps.meterSign);
|
|
- // // LogUtil.info("CollectThread.handlePointSet " +
|
|
|
|
|
|
+ // // LogUtil.info("DownThread.handlePointSet " +
|
|
// // ps.buildingSign + " " + ps.meterSign + "." +
|
|
// // ps.buildingSign + " " + ps.meterSign + "." +
|
|
// // ps.funcID
|
|
// // ps.funcID
|
|
// // + " " + address);
|
|
// // + " " + address);
|
|
@@ -229,7 +198,7 @@ public class CollectThread extends Thread {
|
|
// break;
|
|
// break;
|
|
// } catch (Exception e) {
|
|
// } catch (Exception e) {
|
|
// // TODO Auto-generated catch block
|
|
// // TODO Auto-generated catch block
|
|
- // LogUtil.error("CollectThread.handlePointSet.Exception: " + e.toString());
|
|
|
|
|
|
+ // LogUtil.error("DownThread.handlePointSet.Exception: " + e.toString());
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
@@ -241,7 +210,7 @@ public class CollectThread extends Thread {
|
|
// }
|
|
// }
|
|
// } catch (Exception e) {
|
|
// } catch (Exception e) {
|
|
// // TODO Auto-generated catch block
|
|
// // TODO Auto-generated catch block
|
|
- // LogUtil.error("CollectThread.handlePointSet.Exception: " + e.toString());
|
|
|
|
|
|
+ // LogUtil.error("DownThread.handlePointSet.Exception: " + e.toString());
|
|
// }
|
|
// }
|
|
//
|
|
//
|
|
// }
|
|
// }
|
|
@@ -257,10 +226,10 @@ public class CollectThread extends Thread {
|
|
String[] list = p.content.packetString.replace("(", "").replace(")", "").replace(" ", "").split("&");
|
|
String[] list = p.content.packetString.replace("(", "").replace(")", "").replace(" ", "").split("&");
|
|
// LogUtil.info("handlePacket split end...");
|
|
// LogUtil.info("handlePacket split end...");
|
|
StringBuffer sb = new StringBuffer();
|
|
StringBuffer sb = new StringBuffer();
|
|
- // LogUtil.info("CollectThread Challenge
|
|
|
|
|
|
+ // LogUtil.info("DownThread Challenge
|
|
// Constant.CollectReportList begin...");
|
|
// Constant.CollectReportList begin...");
|
|
|
|
|
|
- // LogUtil.info("CollectThread Challenge
|
|
|
|
|
|
+ // LogUtil.info("DownThread Challenge
|
|
// Constant.CollectReportList get...");
|
|
// Constant.CollectReportList get...");
|
|
for (String s : list) {
|
|
for (String s : list) {
|
|
// LogUtil.info("handlePacket " + s);
|
|
// LogUtil.info("handlePacket " + s);
|
|
@@ -273,10 +242,10 @@ public class CollectThread extends Thread {
|
|
Constant.pointMAC.put(rList[0] + "-" + rList[5], rList[1]);
|
|
Constant.pointMAC.put(rList[0] + "-" + rList[5], rList[1]);
|
|
Constant.collectCount++;
|
|
Constant.collectCount++;
|
|
Constant.ps_PhysicalStatus.put(rList[0] + ";" + rList[1] + ";;;", System.currentTimeMillis());
|
|
Constant.ps_PhysicalStatus.put(rList[0] + ";" + rList[1] + ";;;", System.currentTimeMillis());
|
|
- // LogUtil.info("CollectThread Challenge
|
|
|
|
|
|
+ // LogUtil.info("DownThread Challenge
|
|
// Constant.CollectReportList begin...");
|
|
// Constant.CollectReportList begin...");
|
|
// synchronized (Constant.CollectReportList) {
|
|
// synchronized (Constant.CollectReportList) {
|
|
- // LogUtil.info("CollectThread Challenge
|
|
|
|
|
|
+ // LogUtil.info("DownThread Challenge
|
|
// Constant.CollectReportList get...");
|
|
// Constant.CollectReportList get...");
|
|
synchronized (Constant.CollectReportList) {
|
|
synchronized (Constant.CollectReportList) {
|
|
if (Constant.BuildingAdds.containsKey(rList[0])) {
|
|
if (Constant.BuildingAdds.containsKey(rList[0])) {
|
|
@@ -300,7 +269,7 @@ public class CollectThread extends Thread {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// }
|
|
// }
|
|
- // LogUtil.info("CollectThread Challenge
|
|
|
|
|
|
+ // LogUtil.info("DownThread Challenge
|
|
// Constant.CollectReportList release...");
|
|
// Constant.CollectReportList release...");
|
|
// LogUtil.info("handlePacket pushData begin...");
|
|
// LogUtil.info("handlePacket pushData begin...");
|
|
this.pushData(rList);
|
|
this.pushData(rList);
|
|
@@ -323,10 +292,10 @@ public class CollectThread extends Thread {
|
|
Constant.pointMAC.put(rList[0] + "-" + rList[5], rList[1]);
|
|
Constant.pointMAC.put(rList[0] + "-" + rList[5], rList[1]);
|
|
Constant.collectCount++;
|
|
Constant.collectCount++;
|
|
Constant.ps_PhysicalStatus.put(rList[0] + ";" + rList[1] + ";;;", System.currentTimeMillis());
|
|
Constant.ps_PhysicalStatus.put(rList[0] + ";" + rList[1] + ";;;", System.currentTimeMillis());
|
|
- // LogUtil.info("CollectThread Challenge
|
|
|
|
|
|
+ // LogUtil.info("DownThread Challenge
|
|
// Constant.CollectReportList begin...");
|
|
// Constant.CollectReportList begin...");
|
|
// synchronized (Constant.CollectReportList) {
|
|
// synchronized (Constant.CollectReportList) {
|
|
- // LogUtil.info("CollectThread Challenge
|
|
|
|
|
|
+ // LogUtil.info("DownThread Challenge
|
|
// Constant.CollectReportList get...");
|
|
// Constant.CollectReportList get...");
|
|
synchronized (Constant.CollectReportList) {
|
|
synchronized (Constant.CollectReportList) {
|
|
if (Constant.BuildingAdds.containsKey(rList[0])) {
|
|
if (Constant.BuildingAdds.containsKey(rList[0])) {
|
|
@@ -351,7 +320,7 @@ public class CollectThread extends Thread {
|
|
}
|
|
}
|
|
|
|
|
|
// }
|
|
// }
|
|
- // LogUtil.info("CollectThread Challenge
|
|
|
|
|
|
+ // LogUtil.info("DownThread Challenge
|
|
// Constant.CollectReportList release...");
|
|
// Constant.CollectReportList release...");
|
|
// LogUtil.info("handlePacket pushData begin...");
|
|
// LogUtil.info("handlePacket pushData begin...");
|
|
this.pushDataAddtion(rList);
|
|
this.pushDataAddtion(rList);
|
|
@@ -391,9 +360,9 @@ public class CollectThread extends Thread {
|
|
// Constant.format(new Date()),
|
|
// Constant.format(new Date()),
|
|
// Long.valueOf(rList[4]), "senddownsetack",
|
|
// Long.valueOf(rList[4]), "senddownsetack",
|
|
// "processing:finish:" + rList[7]);
|
|
// "processing:finish:" + rList[7]);
|
|
- Constant.Insert_agents_ps_virtual_point_log(rList[0], rList[5], Long.valueOf(rList[6]), "down",
|
|
|
|
- System.currentTimeMillis(), Long.valueOf(rList[4]), "senddownsetack",
|
|
|
|
- "processing:finish:" + rList[7]);
|
|
|
|
|
|
+ Constant.Insert_ps_virtual_point_log(Constant.Database, rList[0], rList[5],
|
|
|
|
+ Long.valueOf(rList[6]), "down", Constant.format(new Date()), Long.valueOf(rList[4]),
|
|
|
|
+ "senddownsetack", "processing:finish:" + rList[7]);
|
|
|
|
|
|
} else if ("connect".equalsIgnoreCase(rList[2])) {
|
|
} else if ("connect".equalsIgnoreCase(rList[2])) {
|
|
sb.append(rList[0] + ";" + rList[1] + ";" + "connectack" + ";" + Constant.format(new Date()));
|
|
sb.append(rList[0] + ";" + rList[1] + ";" + "connectack" + ";" + Constant.format(new Date()));
|
|
@@ -521,8 +490,7 @@ public class CollectThread extends Thread {
|
|
// Constant.BuildingDB.get(building), "dy_pointlist",
|
|
// Constant.BuildingDB.get(building), "dy_pointlist",
|
|
// building).entrySet()) {
|
|
// building).entrySet()) {
|
|
for (Entry<String, List<Integer>> mfs : Constant
|
|
for (Entry<String, List<Integer>> mfs : Constant
|
|
- .AgentsGetDBPointList(Constant.BuildingDB.get(building), "dy_pointlist", building)
|
|
|
|
- .entrySet()) {
|
|
|
|
|
|
+ .GetDBPointList2Cache(Constant.Database, "dy_pointlist", building).entrySet()) {
|
|
StringBuffer sb1 = new StringBuffer();
|
|
StringBuffer sb1 = new StringBuffer();
|
|
sb1.append(building).append(";").append(rList[1]).append(";").append("getdbpointlistack")
|
|
sb1.append(building).append(";").append(rList[1]).append(";").append("getdbpointlistack")
|
|
.append(";").append(mfs.getKey()).append(";").append(mfs.getValue().size());
|
|
.append(";").append(mfs.getKey()).append(";").append(mfs.getValue().size());
|
|
@@ -546,13 +514,13 @@ public class CollectThread extends Thread {
|
|
// "第三方", p.address.split(":")[0],
|
|
// "第三方", p.address.split(":")[0],
|
|
// p.address, p.address.split(":")[1], "", "",
|
|
// p.address, p.address.split(":")[1], "", "",
|
|
// "15min", rList[6 + 2 * i], "");
|
|
// "15min", rList[6 + 2 * i], "");
|
|
- Constant.Insert_agents_dy_pointlist(building, meter, Integer.valueOf(rList[5 + 2 * i]),
|
|
|
|
- "其他", "第三方", p.address.split(":")[0], p.address, p.address.split(":")[1], "", "",
|
|
|
|
- "15min", rList[6 + 2 * i], "");
|
|
|
|
|
|
+ Constant.Insert_dy_pointlist(building, meter, Integer.valueOf(rList[5 + 2 * i]), "其他",
|
|
|
|
+ "第三方", p.address.split(":")[0], p.address, p.address.split(":")[1], "", "", "15min",
|
|
|
|
+ rList[6 + 2 * i], "");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- LogUtil.info("CollectThread Challenge Constant.CollectReportList release...");
|
|
|
|
|
|
+ LogUtil.info("DownThread Challenge Constant.CollectReportList release...");
|
|
|
|
|
|
if (sb.length() > 0) {
|
|
if (sb.length() > 0) {
|
|
server.AppendToSend(p.address, new Packet(sb.toString()));
|
|
server.AppendToSend(p.address, new Packet(sb.toString()));
|
|
@@ -563,7 +531,7 @@ public class CollectThread extends Thread {
|
|
}
|
|
}
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
// TODO Auto-generated catch block
|
|
// TODO Auto-generated catch block
|
|
- LogUtil.error("CollectThread.handlePacket.Exception: " + e.toString());
|
|
|
|
|
|
+ LogUtil.error("DownThread.handlePacket.Exception: " + e.toString());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -605,10 +573,10 @@ public class CollectThread extends Thread {
|
|
// "").replace(" ", "").split("&");
|
|
// "").replace(" ", "").split("&");
|
|
// // LogUtil.info("handlePacket split end...");
|
|
// // LogUtil.info("handlePacket split end...");
|
|
// StringBuffer sb = new StringBuffer();
|
|
// StringBuffer sb = new StringBuffer();
|
|
- // // LogUtil.info("CollectThread Challenge
|
|
|
|
|
|
+ // // LogUtil.info("DownThread Challenge
|
|
// // Constant.CollectReportList begin...");
|
|
// // Constant.CollectReportList begin...");
|
|
//
|
|
//
|
|
- // // LogUtil.info("CollectThread Challenge
|
|
|
|
|
|
+ // // LogUtil.info("DownThread Challenge
|
|
// // Constant.CollectReportList get...");
|
|
// // Constant.CollectReportList get...");
|
|
// for (String s : list) {
|
|
// for (String s : list) {
|
|
// // LogUtil.info("handlePacket " + s);
|
|
// // LogUtil.info("handlePacket " + s);
|
|
@@ -621,10 +589,10 @@ public class CollectThread extends Thread {
|
|
// Constant.collectCount++;
|
|
// Constant.collectCount++;
|
|
// Constant.ps_NodeStatus.put(rList[0] + "-" + rList[1],
|
|
// Constant.ps_NodeStatus.put(rList[0] + "-" + rList[1],
|
|
// System.currentTimeMillis());
|
|
// System.currentTimeMillis());
|
|
- // // LogUtil.info("CollectThread Challenge
|
|
|
|
|
|
+ // // LogUtil.info("DownThread Challenge
|
|
// // Constant.CollectReportList begin...");
|
|
// // Constant.CollectReportList begin...");
|
|
// // synchronized (Constant.CollectReportList) {
|
|
// // synchronized (Constant.CollectReportList) {
|
|
- // // LogUtil.info("CollectThread Challenge
|
|
|
|
|
|
+ // // LogUtil.info("DownThread Challenge
|
|
// // Constant.CollectReportList get...");
|
|
// // Constant.CollectReportList get...");
|
|
// synchronized (Constant.CollectReportList) {
|
|
// synchronized (Constant.CollectReportList) {
|
|
// if (Constant.BuildingAdds.containsKey(rList[0])) {
|
|
// if (Constant.BuildingAdds.containsKey(rList[0])) {
|
|
@@ -648,7 +616,7 @@ public class CollectThread extends Thread {
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
// // }
|
|
// // }
|
|
- // // LogUtil.info("CollectThread Challenge
|
|
|
|
|
|
+ // // LogUtil.info("DownThread Challenge
|
|
// // Constant.CollectReportList release...");
|
|
// // Constant.CollectReportList release...");
|
|
// // LogUtil.info("handlePacket pushData begin...");
|
|
// // LogUtil.info("handlePacket pushData begin...");
|
|
// this.pushData(rList);
|
|
// this.pushData(rList);
|
|
@@ -674,10 +642,10 @@ public class CollectThread extends Thread {
|
|
// Constant.collectCount++;
|
|
// Constant.collectCount++;
|
|
// Constant.ps_NodeStatus.put(rList[0] + "-" + rList[1],
|
|
// Constant.ps_NodeStatus.put(rList[0] + "-" + rList[1],
|
|
// System.currentTimeMillis());
|
|
// System.currentTimeMillis());
|
|
- // // LogUtil.info("CollectThread Challenge
|
|
|
|
|
|
+ // // LogUtil.info("DownThread Challenge
|
|
// // Constant.CollectReportList begin...");
|
|
// // Constant.CollectReportList begin...");
|
|
// // synchronized (Constant.CollectReportList) {
|
|
// // synchronized (Constant.CollectReportList) {
|
|
- // // LogUtil.info("CollectThread Challenge
|
|
|
|
|
|
+ // // LogUtil.info("DownThread Challenge
|
|
// // Constant.CollectReportList get...");
|
|
// // Constant.CollectReportList get...");
|
|
// synchronized (Constant.CollectReportList) {
|
|
// synchronized (Constant.CollectReportList) {
|
|
// if (Constant.BuildingAdds.containsKey(rList[0])) {
|
|
// if (Constant.BuildingAdds.containsKey(rList[0])) {
|
|
@@ -702,7 +670,7 @@ public class CollectThread extends Thread {
|
|
// }
|
|
// }
|
|
//
|
|
//
|
|
// // }
|
|
// // }
|
|
- // // LogUtil.info("CollectThread Challenge
|
|
|
|
|
|
+ // // LogUtil.info("DownThread Challenge
|
|
// // Constant.CollectReportList release...");
|
|
// // Constant.CollectReportList release...");
|
|
// // LogUtil.info("handlePacket pushData begin...");
|
|
// // LogUtil.info("handlePacket pushData begin...");
|
|
// this.pushDataAddtion(rList);
|
|
// this.pushDataAddtion(rList);
|
|
@@ -917,7 +885,7 @@ public class CollectThread extends Thread {
|
|
// funcidList);
|
|
// funcidList);
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
- // LogUtil.info("CollectThread Challenge Constant.CollectReportList
|
|
|
|
|
|
+ // LogUtil.info("DownThread Challenge Constant.CollectReportList
|
|
// release...");
|
|
// release...");
|
|
//
|
|
//
|
|
// if (sb.length() > 0) {
|
|
// if (sb.length() > 0) {
|
|
@@ -930,7 +898,7 @@ public class CollectThread extends Thread {
|
|
// }
|
|
// }
|
|
// } catch (Exception e) {
|
|
// } catch (Exception e) {
|
|
// // TODO Auto-generated catch block
|
|
// // TODO Auto-generated catch block
|
|
- // LogUtil.error("CollectThread.handlePacket.Exception: " + e.toString());
|
|
|
|
|
|
+ // LogUtil.error("DownThread.handlePacket.Exception: " + e.toString());
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
|
|
|
|
@@ -969,7 +937,7 @@ public class CollectThread extends Thread {
|
|
// } catch (Exception e) {
|
|
// } catch (Exception e) {
|
|
// // TODO Auto-generated catch block
|
|
// // TODO Auto-generated catch block
|
|
// e.printStackTrace();
|
|
// e.printStackTrace();
|
|
- // LogUtil.error("CollectThread.insertCollectorCommunicationLog.Exception: "
|
|
|
|
|
|
+ // LogUtil.error("DownThread.insertCollectorCommunicationLog.Exception: "
|
|
// + e.toString());
|
|
// + e.toString());
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
@@ -1002,7 +970,7 @@ public class CollectThread extends Thread {
|
|
}
|
|
}
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
// TODO Auto-generated catch block
|
|
// TODO Auto-generated catch block
|
|
- LogUtil.error("CollectThread.pushData.Exception: " + e.toString());
|
|
|
|
|
|
+ LogUtil.error("DownThread.pushData.Exception: " + e.toString());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1043,7 +1011,7 @@ public class CollectThread extends Thread {
|
|
}
|
|
}
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
// TODO Auto-generated catch block
|
|
// TODO Auto-generated catch block
|
|
- LogUtil.error("CollectThread.pushData2.Exception: " + e.toString());
|
|
|
|
|
|
+ LogUtil.error("DownThread.pushData2.Exception: " + e.toString());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1094,7 +1062,7 @@ public class CollectThread extends Thread {
|
|
//
|
|
//
|
|
// } catch (Exception e) {
|
|
// } catch (Exception e) {
|
|
// // TODO Auto-generated catch block
|
|
// // TODO Auto-generated catch block
|
|
- // LogUtil.error("CollectThread.handleData.Exception: " + e.toString());
|
|
|
|
|
|
+ // LogUtil.error("DownThread.handleData.Exception: " + e.toString());
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
|
|
|
|
@@ -1148,7 +1116,7 @@ public class CollectThread extends Thread {
|
|
|
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
// TODO Auto-generated catch block
|
|
// TODO Auto-generated catch block
|
|
- LogUtil.error("CollectThread.handleData.Exception: " + e.toString());
|
|
|
|
|
|
+ LogUtil.error("DownThread.handleData.Exception: " + e.toString());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1201,7 +1169,7 @@ public class CollectThread extends Thread {
|
|
Constant.Meter_Collector.put(building + "-" + meter, address);
|
|
Constant.Meter_Collector.put(building + "-" + meter, address);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
// TODO Auto-generated catch block
|
|
// TODO Auto-generated catch block
|
|
- LogUtil.error("CollectThread.updateMeterCollector.Exception: " + e.toString());
|
|
|
|
|
|
+ LogUtil.error("DownThread.updateMeterCollector.Exception: " + e.toString());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1223,7 +1191,7 @@ public class CollectThread extends Thread {
|
|
Constant.Meter_Collector_Control.put(building + "-" + meter, address);
|
|
Constant.Meter_Collector_Control.put(building + "-" + meter, address);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
// TODO Auto-generated catch block
|
|
// TODO Auto-generated catch block
|
|
- LogUtil.error("CollectThread.updateMeterCollector.Exception: " + e.toString());
|
|
|
|
|
|
+ LogUtil.error("DownThread.updateMeterCollector.Exception: " + e.toString());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1238,7 +1206,7 @@ public class CollectThread extends Thread {
|
|
// }
|
|
// }
|
|
// } catch (Exception e) {
|
|
// } catch (Exception e) {
|
|
// // TODO Auto-generated catch block
|
|
// // TODO Auto-generated catch block
|
|
- // LogUtil.error("CollectThread.needAck.Exception: " + e.toString());
|
|
|
|
|
|
+ // LogUtil.error("DownThread.needAck.Exception: " + e.toString());
|
|
// }
|
|
// }
|
|
// return true;
|
|
// return true;
|
|
// }
|
|
// }
|