Examples of mergeAvailabilityReport()


Examples of org.rhq.enterprise.server.discovery.DiscoveryServerServiceImpl.mergeAvailabilityReport()

        // - The server service uses locking to ensure we don't conflict with an actual report from the agent
        // - It ensure all necessary db modifications take place, like avail history and current avail
        // - It ensures that all ancillary avail change logic, like alerting, still happens.
        DiscoveryServerServiceImpl service = new DiscoveryServerServiceImpl();
        for (AvailabilityReport report : reports.values()) {
            service.mergeAvailabilityReport(report);
        }

        return disableResourceIds;
    }
View Full Code Here

Examples of org.rhq.enterprise.server.discovery.DiscoveryServerServiceImpl.mergeAvailabilityReport()

        // - The server service uses locking to ensure we don't conflict with an actual report from the agent
        // - It ensure all necessary db modifications take place, like avail history and current avail
        // - It ensures that all ancillary avail change logic, like alerting, still happens.
        DiscoveryServerServiceImpl service = new DiscoveryServerServiceImpl();
        for (AvailabilityReport report : reports.values()) {
            service.mergeAvailabilityReport(report);
        }

        // Ask the relevant agents to send a full availability check so that the newly enabled resources get
        // current availability as soon as possible.  Do this async (via Quartz) so we don't hang waiting for
        // Agent connections.
View Full Code Here

Examples of org.rhq.enterprise.server.measurement.AvailabilityManagerLocal.mergeAvailabilityReport()

            if (log.isDebugEnabled())
                log.debug("Processing " + reportToString);

            long start = System.currentTimeMillis();
            AvailabilityManagerLocal availabilityManager = LookupUtil.getAvailabilityManager();
            boolean ok = availabilityManager.mergeAvailabilityReport(availabilityReport);

            long elapsed = (System.currentTimeMillis() - start);
            if (elapsed > 20000L) {
                log.warn("Performance: processed " + reportToString + " - needFull=[" + !ok + "] in (" + elapsed
                    + ")ms");
View Full Code Here

Examples of org.rhq.enterprise.server.measurement.AvailabilityManagerLocal.mergeAvailabilityReport()

        // resource has initial UNKNOWN ResourceAvailability and no Availability records. simulate an avail report
        // coming from the agent and setting the initial avail to UP.
        AvailabilityReport availReport = new AvailabilityReport(AGENT_NAME);
        availReport.addAvailability(new Datum(resource.getId(), AvailabilityType.UP, System.currentTimeMillis()));
        AvailabilityManagerLocal availManager = LookupUtil.getAvailabilityManager();
        availManager.mergeAvailabilityReport(availReport);

        // wait for our JMS messages to process and see if we get any alerts
        Thread.sleep(3000);

        PageList<Alert> alerts = getAlerts(resource.getId());
View Full Code Here

Examples of org.rhq.enterprise.server.measurement.AvailabilityManagerLocal.mergeAvailabilityReport()

        // Now simulate the down avail
        availReport = new AvailabilityReport(AGENT_NAME);
        availReport
            .addAvailability(new Datum(resource.getId(), AvailabilityType.DOWN, System.currentTimeMillis() + 10));
        availManager.mergeAvailabilityReport(availReport);

        // wait for our JMS messages to process and see if we get any alerts
        final PageList<Alert> finalAlerts = alerts;
        timedAssertion(new AssertUtils.BooleanCondition() {
            @Override
View Full Code Here

Examples of org.rhq.enterprise.server.measurement.AvailabilityManagerLocal.mergeAvailabilityReport()

        // resource has initial UNKNOWN ResourceAvailability and no Availability records. simulate an avail report
        // coming from the agent and setting the initial avail to UP.
        AvailabilityReport availReport = new AvailabilityReport(AGENT_NAME);
        availReport.addAvailability(new Datum(resource.getId(), AvailabilityType.UP, System.currentTimeMillis()));
        AvailabilityManagerLocal availManager = LookupUtil.getAvailabilityManager();
        availManager.mergeAvailabilityReport(availReport);

        // wait for our JMS messages to process and see if we get any alerts
        Thread.sleep(4000);

        PageList<Alert> alerts = getAlerts(resource.getId());
View Full Code Here

Examples of org.rhq.enterprise.server.measurement.AvailabilityManagerLocal.mergeAvailabilityReport()

        // Now simulate the down avail
        availReport = new AvailabilityReport(AGENT_NAME);
        availReport
            .addAvailability(new Datum(resource.getId(), AvailabilityType.DOWN, System.currentTimeMillis() + 10));
        availManager.mergeAvailabilityReport(availReport);

        // wait for our JMS messages to process and see if we get any alerts
        Thread.sleep(4000);

        alerts = getAlerts(resource.getId());
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.