@Counter public void checkService(CounterBasket pw) { PrintWriter stuckOut = null; try { boolean checkStuck = false; long now = System.currentTimeMillis(); if (now - lastCheckStuckTime >= conf.autodump_stuck_check_interval_ms) { checkStuck = true; lastCheckStuckTime = now; } StringBuilder stuckMsg = new StringBuilder(); Enumeration<TraceContext> en = TraceContextManager.getContextEnumeration(); while (en.hasMoreElements()) { TraceContext ctx = en.nextElement(); if (checkStuck) { checkStcukService(ctx, stuckOut, stuckMsg); } } if (stuckMsg.length() > 0) { AlertProxy.sendAlert(AlertLevel.WARN, "STUCK_SERVICE", stuckMsg.toString()); } } catch (Exception e) { Logger.println("A154", e.toString()); } finally { FileUtil.close(stuckOut); } }
try { if (out == null) { out = open();
@Counter public void checkService(CounterBasket pw) { PrintWriter stuckOut = null; try { boolean checkStuck = false; long now = System.currentTimeMillis(); if (now - lastCheckStuckTime >= conf.autodump_stuck_check_interval_ms) { checkStuck = true; lastCheckStuckTime = now; } StringBuilder stuckMsg = new StringBuilder(); Enumeration<TraceContext> en = TraceContextManager.getContextEnumeration(); while (en.hasMoreElements()) { TraceContext ctx = en.nextElement(); if (checkStuck) { checkStcukService(ctx, stuckOut, stuckMsg); } } if (stuckMsg.length() > 0) { AlertProxy.sendAlert(AlertLevel.WARN, "STUCK_SERVICE", stuckMsg.toString()); } } catch (Exception e) { Logger.println("A154", e.toString()); } finally { FileUtil.close(stuckOut); } }
try { if (out == null) { out = open();
@Counter public void checkService(CounterBasket pw) { PrintWriter stuckOut = null; try { boolean checkStuck = false; long now = System.currentTimeMillis(); if (now - lastCheckStuckTime >= conf.autodump_stuck_check_interval_ms) { checkStuck = true; lastCheckStuckTime = now; } StringBuilder stuckMsg = new StringBuilder(); Enumeration<TraceContext> en = TraceContextManager.getContextEnumeration(); while (en.hasMoreElements()) { TraceContext ctx = en.nextElement(); if (checkStuck) { checkStcukService(ctx, stuckOut, stuckMsg); } } if (stuckMsg.length() > 0) { AlertProxy.sendAlert(AlertLevel.WARN, "STUCK_SERVICE", stuckMsg.toString()); } } catch (Exception e) { Logger.println("A154", e.toString()); } finally { FileUtil.close(stuckOut); } }
try { if (out == null) { out = open();