Package org.nocrala.tools.texttablefmt

Examples of org.nocrala.tools.texttablefmt.Table.addCell()


                List<String> fixed_ex = new ZNode(ZNODE_FIXED).getChildren();
                for(String name: fixed_ex) {
                    ZooKeeperInfo.Exchange.Builder builder = ZooKeeperInfo.Exchange.newBuilder();
                    TextFormat.merge(new String(new ZNode(ZNODE_FIXED + "/" + name).getContent()), builder);
                    tab.addCell("{queue,topic}:" + name);
                    tab.addCell("Fixed", new CellStyle(HorizontalAlign.center));
                    tab.addCell(builder.build().getHost());
                }
               
                List<String> drop_ex = new ZNode(ZNODE_DROP).getChildren();
                for(String name : drop_ex) {
View Full Code Here


                for(String name: fixed_ex) {
                    ZooKeeperInfo.Exchange.Builder builder = ZooKeeperInfo.Exchange.newBuilder();
                    TextFormat.merge(new String(new ZNode(ZNODE_FIXED + "/" + name).getContent()), builder);
                    tab.addCell("{queue,topic}:" + name);
                    tab.addCell("Fixed", new CellStyle(HorizontalAlign.center));
                    tab.addCell(builder.build().getHost());
                }
               
                List<String> drop_ex = new ZNode(ZNODE_DROP).getChildren();
                for(String name : drop_ex) {
                    ZooKeeperInfo.DropConfig.Builder drop_builder = ZooKeeperInfo.DropConfig.newBuilder();
View Full Code Here

               
                List<String> drop_ex = new ZNode(ZNODE_DROP).getChildren();
                for(String name : drop_ex) {
                    ZooKeeperInfo.DropConfig.Builder drop_builder = ZooKeeperInfo.DropConfig.newBuilder();
                    TextFormat.merge(new String(new ZNode(ZNODE_DROP + "/" + name).getContent()), drop_builder);
                    tab.addCell(name);
                    tab.addCell("Drop Polocy", new CellStyle(HorizontalAlign.center));
                    tab.addCell(drop_builder.build().getPolicy() == DropConfig.Policy.NEWEST ? "newest": "oldest");
                }
               
                List<String> limit_ex = new ZNode(ZNODE_LIMIT).getChildren();
View Full Code Here

                List<String> drop_ex = new ZNode(ZNODE_DROP).getChildren();
                for(String name : drop_ex) {
                    ZooKeeperInfo.DropConfig.Builder drop_builder = ZooKeeperInfo.DropConfig.newBuilder();
                    TextFormat.merge(new String(new ZNode(ZNODE_DROP + "/" + name).getContent()), drop_builder);
                    tab.addCell(name);
                    tab.addCell("Drop Polocy", new CellStyle(HorizontalAlign.center));
                    tab.addCell(drop_builder.build().getPolicy() == DropConfig.Policy.NEWEST ? "newest": "oldest");
                }
               
                List<String> limit_ex = new ZNode(ZNODE_LIMIT).getChildren();
                for(String name : limit_ex) {
View Full Code Here

                for(String name : drop_ex) {
                    ZooKeeperInfo.DropConfig.Builder drop_builder = ZooKeeperInfo.DropConfig.newBuilder();
                    TextFormat.merge(new String(new ZNode(ZNODE_DROP + "/" + name).getContent()), drop_builder);
                    tab.addCell(name);
                    tab.addCell("Drop Polocy", new CellStyle(HorizontalAlign.center));
                    tab.addCell(drop_builder.build().getPolicy() == DropConfig.Policy.NEWEST ? "newest": "oldest");
                }
               
                List<String> limit_ex = new ZNode(ZNODE_LIMIT).getChildren();
                for(String name : limit_ex) {
                    ZooKeeperInfo.TotalLimit.Builder limit_builder = ZooKeeperInfo.TotalLimit.newBuilder();
View Full Code Here

               
                List<String> limit_ex = new ZNode(ZNODE_LIMIT).getChildren();
                for(String name : limit_ex) {
                    ZooKeeperInfo.TotalLimit.Builder limit_builder = ZooKeeperInfo.TotalLimit.newBuilder();
                    TextFormat.merge(new String(new ZNode(ZNODE_LIMIT + "/" + name).getContent()), limit_builder);
                    tab.addCell(name);
                    tab.addCell("Maximum limit", new CellStyle(HorizontalAlign.center));
                    ZooKeeperInfo.TotalLimit limit = limit_builder.build();
                    tab.addCell(String.format("%d bytes / %d messages", limit.getSizeBytes(), limit.getCount()));
                }
View Full Code Here

                List<String> limit_ex = new ZNode(ZNODE_LIMIT).getChildren();
                for(String name : limit_ex) {
                    ZooKeeperInfo.TotalLimit.Builder limit_builder = ZooKeeperInfo.TotalLimit.newBuilder();
                    TextFormat.merge(new String(new ZNode(ZNODE_LIMIT + "/" + name).getContent()), limit_builder);
                    tab.addCell(name);
                    tab.addCell("Maximum limit", new CellStyle(HorizontalAlign.center));
                    ZooKeeperInfo.TotalLimit limit = limit_builder.build();
                    tab.addCell(String.format("%d bytes / %d messages", limit.getSizeBytes(), limit.getCount()));
                }

                List<String> alert_limit_ex = new ZNode(ZNODE_ALERT_LIMIT).getChildren();
View Full Code Here

                    ZooKeeperInfo.TotalLimit.Builder limit_builder = ZooKeeperInfo.TotalLimit.newBuilder();
                    TextFormat.merge(new String(new ZNode(ZNODE_LIMIT + "/" + name).getContent()), limit_builder);
                    tab.addCell(name);
                    tab.addCell("Maximum limit", new CellStyle(HorizontalAlign.center));
                    ZooKeeperInfo.TotalLimit limit = limit_builder.build();
                    tab.addCell(String.format("%d bytes / %d messages", limit.getSizeBytes(), limit.getCount()));
                }

                List<String> alert_limit_ex = new ZNode(ZNODE_ALERT_LIMIT).getChildren();
                for(String name : alert_limit_ex) {
                    ZooKeeperInfo.AlertConfig.Builder alert_limit_builder = ZooKeeperInfo.AlertConfig.newBuilder();
View Full Code Here

                List<String> alert_limit_ex = new ZNode(ZNODE_ALERT_LIMIT).getChildren();
                for(String name : alert_limit_ex) {
                    ZooKeeperInfo.AlertConfig.Builder alert_limit_builder = ZooKeeperInfo.AlertConfig.newBuilder();
                    TextFormat.merge(new ZNode(ZNODE_ALERT_LIMIT + "/" + name).getContentString(), alert_limit_builder);
                    ZooKeeperInfo.AlertConfig alertConfig = alert_limit_builder.build();
                    tab.addCell(name);
                    tab.addCell("Alert limit", new CellStyle(HorizontalAlign.center));
                    tab.addCell(String.format("%d messages to %s", alertConfig.getCount(), alertConfig.getReceiver()));
                }

                myConsole.logResponse("%d configured exchanges%n", fixed_ex.size() + drop_ex.size() + limit_ex.size());
View Full Code Here

                for(String name : alert_limit_ex) {
                    ZooKeeperInfo.AlertConfig.Builder alert_limit_builder = ZooKeeperInfo.AlertConfig.newBuilder();
                    TextFormat.merge(new ZNode(ZNODE_ALERT_LIMIT + "/" + name).getContentString(), alert_limit_builder);
                    ZooKeeperInfo.AlertConfig alertConfig = alert_limit_builder.build();
                    tab.addCell(name);
                    tab.addCell("Alert limit", new CellStyle(HorizontalAlign.center));
                    tab.addCell(String.format("%d messages to %s", alertConfig.getCount(), alertConfig.getReceiver()));
                }

                myConsole.logResponse("%d configured exchanges%n", fixed_ex.size() + drop_ex.size() + limit_ex.size());
                if(fixed_ex.size() + drop_ex.size() + limit_ex.size() > 0)
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.