Package com.alibaba.dubbo.common.status.Status

Examples of com.alibaba.dubbo.common.status.Status.Level


    public static Status getStatusSummary(Map<String, Status> statusList) {
        return getSummaryStatus(statusList);
    }
   
    public static Status getSummaryStatus(Map<String, Status> statuses) {
        Level level = Level.OK;
        StringBuilder msg = new StringBuilder();
        for (Map.Entry<String, Status> entry : statuses.entrySet()) {
            String key = entry.getKey();
            Status status = entry.getValue();
            Level l = status.getLevel();
            if (Level.ERROR.equals(l)) {
                level = Level.ERROR;
                if (msg.length() > 0) {
                    msg.append(",");
                }
View Full Code Here


    public void execute(Map<String,Object> context) throws Exception {
        //FIXME cache监控存在性能问题 汇总页面去掉
        Map<String, com.alibaba.dubbo.common.status.Status> statuses = StatusManager.getInstance().getStatusList(new String[]{"cache"});
        com.alibaba.dubbo.common.status.Status status = StatusManager.getInstance().getStatusSummary(statuses);
        Level level = status.getLevel();
        if (!com.alibaba.dubbo.common.status.Status.Level.OK.equals(level)) {
            context.put("message", level
                    + new SimpleDateFormat(" [yyyy-MM-dd HH:mm:ss] ").format(new Date())
                    + filterOK(status.getMessage()));
        } else {
            context.put("message", level.toString());
        }
        PrintWriter writer = response.getWriter();
        writer.print(context.get("message").toString());
        writer.flush();
    }
View Full Code Here

* @author william.liangf
*/
public class StatusUtils {
   
    public static Status getSummaryStatus(Map<String, Status> statuses) {
        Level level = Level.OK;
        StringBuilder msg = new StringBuilder();
        for (Map.Entry<String, Status> entry : statuses.entrySet()) {
            String key = entry.getKey();
            Status status = entry.getValue();
            Level l = status.getLevel();
            if (Level.ERROR.equals(l)) {
                level = Level.ERROR;
                if (msg.length() > 0) {
                    msg.append(",");
                }
View Full Code Here

TOP

Related Classes of com.alibaba.dubbo.common.status.Status.Level

Copyright © 2018 www.massapicom. 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.