Examples of MeasurementOOBManagerLocal


Examples of org.rhq.enterprise.server.measurement.MeasurementOOBManagerLocal

     */
    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
        manager.computeOOBsForLastHour(overlord, oneHourAggregates);

        long duration = System.currentTimeMillis() - timeStart;

        LOG.info("Auto-calculation of OOBs completed in [" + duration + "]ms");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.