private void shutdown() { running = false; detectorThread.interrupt(); try { detectorThread.join(SLOW_OPERATION_THREAD_MAX_WAIT_TIME_TO_FINISH); } catch (InterruptedException ignored) { currentThread().interrupt(); } } }
String stackTrace = getStackTraceOrNull(operationRunner, operation); if (stackTrace != null) { SlowOperationLog log = getOrCreate(stackTrace, operation); int totalInvocations = log.totalInvocations.incrementAndGet(); operationData.invocation = log.getOrCreate(operationHashCode, operation, durationNanos, nowNanos, nowMillis); logSlowOperation(log, totalInvocations);
String stackTrace = getStackTraceOrNull(operationRunner, operation); if (stackTrace != null) { SlowOperationLog log = getOrCreate(stackTrace, operation); int totalInvocations = log.totalInvocations.incrementAndGet(); operationData.invocation = log.getOrCreate(operationHashCode, operation, durationNanos, nowNanos, nowMillis); logSlowOperation(log, totalInvocations);
private DetectorThread newDetectorThread(String hzName) { DetectorThread thread = new DetectorThread(hzName); return thread; }
private DetectorThread newDetectorThread(String hzName) { DetectorThread thread = new DetectorThread(hzName); return thread; }
private void logSlowOperation(SlowOperationLog log, int totalInvocations) { if (isStackTraceLoggingEnabled) { logWithStackTrace(log, totalInvocations); } else if (!isFirstLog) { logWithoutStackTrace(log, totalInvocations); } else { logWithConfigHint(log); } }
private void logSlowOperation(SlowOperationLog log, int totalInvocations) { if (isStackTraceLoggingEnabled) { logWithStackTrace(log, totalInvocations); } else if (!isFirstLog) { logWithoutStackTrace(log, totalInvocations); } else { logWithConfigHint(log); } }
private void shutdown() { running = false; detectorThread.interrupt(); try { detectorThread.join(SLOW_OPERATION_THREAD_MAX_WAIT_TIME_TO_FINISH); } catch (InterruptedException ignored) { currentThread().interrupt(); } } }