public void calculateOOBs(Iterable<AggregateNumericMetric> oneHourAggregates) {
LOG.info("Auto-calculation of OOBs starting");
Subject overlord = LookupUtil.getSubjectManager().getOverlord();
MeasurementOOBManagerLocal manager = LookupUtil.getOOBManager();
PurgeManagerLocal purgeManager = LookupUtil.getPurgeManager();
SystemManagerLocal systemManager = LookupUtil.getSystemManager();
// purge OOBs whose baseline just got recalculated
// For now just assume that our system is fast, so a cutoff of 30mins is ok,
// as the calculate baseline job runs hourly
long cutOff = System.currentTimeMillis() - (30L * 60L * 1000L);
long timeStart = System.currentTimeMillis();
purgeManager.removeOutdatedOOBs(cutOff);
// clean up
systemManager.vacuum(overlord, new String[] { "RHQ_MEASUREMENT_OOB" });
// Now calculate the fresh OOBs