Examples of HealthHistory


Examples of org.glassfish.gms.bootstrap.HealthHistory

     * Simply get the HealthHistory object from GMSAdapter and output
     * the information.
     */
    private void getHealthWithGMS(Logger logger, ActionReport report, GMSAdapter gmsAdapter) {
        StringBuilder result = new StringBuilder();
        HealthHistory history = gmsAdapter.getHealthHistory();
        if (history == null) {
            setFail(logger, report, Strings.get("get.health.noHistoryError"));
            return;
        }

        // check for data
        if (history.getInstances().isEmpty()) {
            report.setMessage(Strings.get(
                "get.health.no.instances", clusterName));
            return;
        }

        // order by instance name for human-readable output
        SortedSet<String> names = new TreeSet<String>(history.getInstances());

        // this list will be set in the "extra properties" used by admin console
        List<Properties> statesAndTimes =
            new ArrayList<Properties>(names.size());

        for(String name : names) {
            Properties instanceStateAndTime = new Properties();
            HealthHistory.InstanceHealth ih = history.getHealthByInstance(name);

            instanceStateAndTime.put("name", name);
            instanceStateAndTime.put("status", ih.state.name());

            if (HealthHistory.NOTIME == ih.time) {
View Full Code Here

Examples of org.glassfish.gms.bootstrap.HealthHistory

        try {
            /*
             * Should not fail, but we need to make sure it doesn't
             * affect GMS just in case.
             */
            hHistory = new HealthHistory(cluster);
            Dom.unwrap(cluster).addListener(hHistory);
        } catch (Throwable t) {
            logger.log(Level.WARNING, "gmsexception.new.health.history",
                t.getLocalizedMessage());
        }
View Full Code Here

Examples of org.glassfish.gms.bootstrap.HealthHistory

        try {
            /*
             * Should not fail, but we need to make sure it doesn't
             * affect GMS just in case.
             */
            hHistory = new HealthHistory(instanceName, keepFormerMembers);
        } catch (Throwable t) {
            logger.log(Level.WARNING, "gmsexception.new.health.history",
                t.getLocalizedMessage());
        }
    }
View Full Code Here

Examples of org.glassfish.gms.bootstrap.HealthHistory

     * Simply get the HealthHistory object from GMSAdapter and output
     * the information.
     */
    private void getHealthWithGMS() {
        StringBuilder result = new StringBuilder();
        HealthHistory history = gmsAdapter.getHealthHistory();
        if (history == null) {
            setFail(Strings.get("get.health.noHistoryError"));
            return;
        }

        // check for data
        if (history.getInstances().isEmpty()) {
            report.setMessage(Strings.get(
                "get.health.no.instances", clusterName));
            return;
        }

        // order by instance name for human-readable output
        SortedSet<String> names = new TreeSet<String>(history.getInstances());

        // this list will be set in the "extra properties" used by admin console
        List<Properties> statesAndTimes =
            new ArrayList<Properties>(names.size());

        for(String name : names) {
            Properties instanceStateAndTime = new Properties();
            HealthHistory.InstanceHealth ih = history.getHealthByInstance(name);

            instanceStateAndTime.put("name", name);
            instanceStateAndTime.put("status", ih.state.name());

            if (HealthHistory.NOTIME == ih.time) {
View Full Code Here

Examples of org.glassfish.gms.bootstrap.HealthHistory

     * Simply get the HealthHistory object from GMSAdapter and output
     * the information.
     */
    private void getHealthWithGMS() {
        StringBuilder result = new StringBuilder();
        HealthHistory history = gmsAdapter.getHealthHistory();
        if (history == null) {
            setFail(Strings.get("get.health.noHistoryError"));
            return;
        }

        // check for data
        if (history.getInstances().isEmpty()) {
            report.setMessage(Strings.get(
                "get.health.no.instances", clusterName));
            return;
        }

        // order by instance name and output
        SortedSet<String> names = new TreeSet<String>(history.getInstances());
        for(String name : names) {
            HealthHistory.InstanceHealth ih = history.getHealthByInstance(name);
            if (HealthHistory.NOTIME == ih.time) {
                result.append(Strings.get("get.health.instance.state",
                    name, ih.state));
            } else {
                result.append(Strings.get("get.health.instance.state.since",
View Full Code Here

Examples of org.glassfish.gms.bootstrap.HealthHistory

        try {
            /*
             * Should not fail, but we need to make sure it doesn't
             * affect GMS just in case.
             */
            hHistory = new HealthHistory(cluster);
            Dom.unwrap(cluster).addListener(hHistory);
        } catch (Throwable t) {
            logger.log(Level.WARNING, "gmsexception.new.health.history",
                t.getLocalizedMessage());
        }
View Full Code Here

Examples of org.glassfish.gms.bootstrap.HealthHistory

        try {
            /*
             * Should not fail, but we need to make sure it doesn't
             * affect GMS just in case.
             */
            hHistory = new HealthHistory(cluster);
            Dom.unwrap(cluster).addListener(hHistory);
        } catch (Throwable t) {
            GMS_LOGGER.log(LogLevel.WARNING, GMS_EXCEPTION_NEW_HEALTH_HISTORY,
                t.getLocalizedMessage());
        }
View Full Code Here

Examples of org.glassfish.gms.bootstrap.HealthHistory

     * Simply get the HealthHistory object from GMSAdapter and output
     * the information.
     */
    private void getHealthWithGMS() {
        StringBuilder result = new StringBuilder();
        HealthHistory history = gmsAdapter.getHealthHistory();
        if (history == null) {
            setFail(Strings.get("get.health.noHistoryError"));
            return;
        }

        // check for data
        if (history.getInstances().isEmpty()) {
            report.setMessage(Strings.get(
                "get.health.no.instances", clusterName));
            return;
        }

        // order by instance name for human-readable output
        SortedSet<String> names = new TreeSet<String>(history.getInstances());

        // this list will be set in the "extra properties" used by admin console
        List<Properties> statesAndTimes =
            new ArrayList<Properties>(names.size());

        for(String name : names) {
            Properties instanceStateAndTime = new Properties();
            HealthHistory.InstanceHealth ih = history.getHealthByInstance(name);

            instanceStateAndTime.put("name", name);
            instanceStateAndTime.put("status", ih.state.name());

            if (HealthHistory.NOTIME == ih.time) {
View Full Code Here

Examples of org.glassfish.gms.bootstrap.HealthHistory

        try {
            /*
             * Should not fail, but we need to make sure it doesn't
             * affect GMS just in case.
             */
            hHistory = new HealthHistory(cluster);
            Dom.unwrap(cluster).addListener(hHistory);
        } catch (Throwable t) {
            logger.log(Level.WARNING, "gmsexception.new.health.history",
                t.getLocalizedMessage());
        }
View Full Code Here

Examples of org.glassfish.gms.bootstrap.HealthHistory

        try {
            /*
             * Should not fail, but we need to make sure it doesn't
             * affect GMS just in case.
             */
            hHistory = new HealthHistory(instanceName, keepFormerMembers);
        } catch (Throwable t) {
            logger.log(Level.WARNING, "gmsexception.new.health.history",
                t.getLocalizedMessage());
        }
    }
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.