try {
pmResultChannel.put(pmDatas);
- } catch (InterruptedException e) {
+ } catch (Exception e) {
pmResultChannel.clear();
log.error("collectResultChannel.put(resultMap) error ", e);
}
HashMap<String, String> resultMap = this.resultMap(columnNames, valuelist);
try {
pmResultChannel.put(resultMap);
- } catch (InterruptedException e) {
+ } catch (Exception e) {
pmResultChannel.clear();
log.error("collectResultChannel.put(resultMap) error ", e);
}
public CollectMsg receive() {
try {
return queue.poll(100, TimeUnit.MILLISECONDS);
- } catch (InterruptedException e) {
+ } catch (Exception e) {
log.error("queue.poll is error" + StringUtil.getStackTrace(e));
}
return null;
public void add(CollectMsg data) {
try {
queue.put(data);
- } catch (InterruptedException e) {
+ } catch (Exception e) {
log.error("queue.put is error" + StringUtil.getStackTrace(e));
}
}
try {
Thread.sleep(1000);
log.debug("The configuration properties from " + ConfigurationManager.CONFIG_PROPERTIES_LOCATION + " is not load");
- } catch (InterruptedException e) {
+ } catch (Exception e) {
+ log.error("Exception",e);
}
}
}
public final static String syncAlarmMessageByalarmSeq = "reqSyncAlarmFile;reqID=%s;alarmSeq=%s;syncSource=1";
public final static String syncActiveAlarmFileMsg = "reqSyncAlarmFile;reqID=%s;startTime=%s;endTime=%s;syncSource=0";
public final static String syncAlarmFileMsg = "reqSyncAlarmFile;reqID=%s;startTime=%s;endTime=%s;syncSource=1";
- public static short StartSign = (short) 0xffff;
+ public final static short StartSign = (short) 0xffff;
private MsgType msgType;
private int timeStamp = 0;
private int lenOfBody = 0;
while (!isEnd()) {
try {
Thread.sleep(1);
- } catch (InterruptedException e) {
- log.error("InterruptedException :" + StringUtil.getStackTrace(e));
+ } catch (Exception e) {
+ log.error("Exception :", e);
}
}
return end;
AgentMain.evel_post_event(header);
log.info("HeatBeat send!");
try {
- Thread.sleep(60 * 1000);
+ Thread.sleep(60000);//60 secs
} catch (Exception e) {
// e.printStackTrace();
log.error("Unable to sleep the HB thread ", e);
if (emsInfos.size() == 0) {
try {
Thread.sleep(1000);
- } catch (InterruptedException e) {
- }
+ } catch (Exception e) {
+ log.error("Sleep interrupted",e);
+ }
}
}
try {
collectChannel.put(collectMsg);
- } catch (InterruptedException e) {
+ } catch (Exception e) {
log.error("collectChannel.put is error ", e);
}
} else {