int computeElapsedPeriodsSinceLastClean(long nowInMillis) { long periodsElapsed = 0; if (lastHeartBeat == UNINITIALIZED) { addInfo("first clean up after appender initialization"); periodsElapsed = rc.periodsElapsed(nowInMillis, nowInMillis + INACTIVITY_TOLERANCE_IN_MILLIS); if (periodsElapsed > MAX_VALUE_FOR_INACTIVITY_PERIODS) periodsElapsed = MAX_VALUE_FOR_INACTIVITY_PERIODS; } else { periodsElapsed = rc.periodsElapsed(lastHeartBeat, nowInMillis); if (periodsElapsed < 1) { addWarn("Unexpected periodsElapsed value " + periodsElapsed); periodsElapsed = 1; } } return (int) periodsElapsed; }
int computeElapsedPeriodsSinceLastClean(long nowInMillis) { long periodsElapsed = 0; if (lastHeartBeat == UNINITIALIZED) { addInfo("first clean up after appender initialization"); periodsElapsed = rc.periodsElapsed(nowInMillis, nowInMillis + INACTIVITY_TOLERANCE_IN_MILLIS); if (periodsElapsed > MAX_VALUE_FOR_INACTIVITY_PERIODS) periodsElapsed = MAX_VALUE_FOR_INACTIVITY_PERIODS; } else { periodsElapsed = rc.periodsElapsed(lastHeartBeat, nowInMillis); if (periodsElapsed < 1) { addWarn("Unexpected periodsElapsed value " + periodsElapsed); periodsElapsed = 1; } } return (int) periodsElapsed; }
int computeElapsedPeriodsSinceLastClean(long nowInMillis) { long periodsElapsed = 0; if (lastHeartBeat == UNINITIALIZED) { addInfo("first clean up after appender initialization"); periodsElapsed = rc.periodsElapsed(nowInMillis, nowInMillis + INACTIVITY_TOLERANCE_IN_MILLIS); if (periodsElapsed > MAX_VALUE_FOR_INACTIVITY_PERIODS) periodsElapsed = MAX_VALUE_FOR_INACTIVITY_PERIODS; } else { periodsElapsed = rc.periodsElapsed(lastHeartBeat, nowInMillis); if (periodsElapsed < 1) { addWarn("Unexpected periodsElapsed value " + periodsElapsed); periodsElapsed = 1; } } return (int) periodsElapsed; }
int computeElapsedPeriodsSinceLastClean(long nowInMillis) { long periodsElapsed = 0; if (lastHeartBeat == UNINITIALIZED) { addInfo("first clean up after appender initialization"); periodsElapsed = rc.periodsElapsed(nowInMillis, nowInMillis + INACTIVITY_TOLERANCE_IN_MILLIS); if (periodsElapsed > MAX_VALUE_FOR_INACTIVITY_PERIODS) periodsElapsed = MAX_VALUE_FOR_INACTIVITY_PERIODS; } else { periodsElapsed = rc.periodsElapsed(lastHeartBeat, nowInMillis); if (periodsElapsed < 1) { addWarn("Unexpected periodsElapsed value " + periodsElapsed); periodsElapsed = 1; } } return (int) periodsElapsed; }