package jrds;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.font.FontRenderContext;
import java.awt.font.LineMetrics;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import jrds.Util.SiPrefix;
import jrds.probe.IndexedProbe;
import jrds.probe.UrlProbe;
import jrds.probe.jdbc.JdbcProbe;
import jrds.webapp.ACL;
import jrds.webapp.WithACL;
import org.apache.logging.log4j.*;
import org.rrd4j.ConsolFun;
import org.rrd4j.data.DataProcessor;
import org.rrd4j.data.Plottable;
import org.rrd4j.graph.RrdGraphConstants;
import org.rrd4j.graph.RrdGraphDef;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
/**
* A classed used to store the static description of a graph
* @author Fabrice Bacchella
*/
public class GraphDesc
implements Cloneable, WithACL {
static final private Logger logger = LogManager.getLogger(GraphDesc.class);
static public final ConsolFun DEFAULTCF = ConsolFun.AVERAGE;
// static final private String manySpace = "123456798ABCDEF0123465798ABCDEF0123456798ABCDEF0123465798ABCDEF0123456798ABCDEF0123465798ABCDEF0";
static final private String MANYSPACE = " ";
public enum GraphType {
NONE {
public String toString() {
return "none";
}
public boolean datasource() {
return true;
}
public boolean toPlot() {
return false;
}
public boolean legend() {
return false;
}
},
PERCENTILE {
public String toString() {
return "percentile";
}
public boolean datasource() {
return true;
}
public boolean toPlot() {
return false;
}
public boolean legend() {
return false;
}
},
LEGEND {
public String toString() {
return "legend";
}
public boolean datasource() {
return true;
}
public boolean toPlot() {
return false;
}
public boolean legend() {
return true;
}
},
PERCENTILELEGEND {
@Override
public String toString() {
return "percentile legend";
};
public boolean datasource() {
return false;
}
public boolean toPlot() {
return false;
};
public boolean legend() {
return true;
};
},
COMMENT {
public String toString() {
return "comment";
}
public boolean datasource() {
return false;
}
public boolean toPlot() {
return false;
}
public boolean legend() {
return true;
}
},
LINE {
public void draw(RrdGraphDef rgd, String sn, Color color, String legend) {
rgd.line(sn, color, legend);
};
@Override
public String toString() {
return "line";
};
public boolean datasource() {
return true;
}
public boolean toPlot() {
return true;
};
public boolean legend() {
return true;
};
},
AREA {
public void draw(RrdGraphDef rgd, String sn, Color color, String legend) {
rgd.area(sn, color, legend);
};
@Override
public String toString() {
return "area";
};
public boolean datasource() {
return true;
}
public boolean toPlot() {
return true;
};
public boolean legend() {
return true;
};
},
STACK {
public void draw(RrdGraphDef rgd, String sn, Color color, String legend) {
rgd.stack(sn, color, legend);
};
@Override
public String toString() {
return "stack";
};
public boolean datasource() {
return true;
}
public boolean toPlot() {
return true;
};
public boolean legend() {
return true;
};
};
public void draw(RrdGraphDef rgd, String sn, Color color, String legend) {};
/**
* To check if it will generate a plot, for color calculation
* @return
*/
public abstract boolean toPlot();
public abstract boolean datasource();
/**
* To check if it will generate a line in the legend block
* @return
*/
public abstract boolean legend();
};
//Old name kept
static final public GraphType NONE = GraphType.NONE;
static final public GraphType DATASOURCE = GraphType.NONE;
static final public GraphType LINE = GraphType.LINE;
static final public GraphType AREA = GraphType.AREA;
static final public GraphType STACK = GraphType.STACK;
static final public GraphType COMMENT = GraphType.COMMENT;
private enum PathElement {
HOST {
public String resolve(GraphNode graph) {
return graph.getProbe().getHost().getName();
}
},
TITLE {
public String resolve(GraphNode graph) {
return graph.getGraphTitle();
}
},
INDEX {
public String resolve(GraphNode graph) {
StringBuffer retValue = new StringBuffer("empty");
if(graph.getProbe() instanceof IndexedProbe) {
retValue.setLength(0);
IndexedProbe ip = (IndexedProbe) graph.getProbe();
retValue.append(ip.getIndexName());
//Check to see if a label is defined and needed to add
String label = graph.getProbe().getLabel();
if(label != null) {
retValue.append(" (" + label + ")");
}
}
else {
logger.debug("Bad graph definition for " + graph);
}
return retValue.toString();
}
},
URL {
public String resolve(GraphNode graph) {
String url = "";
Probe<?,?> probe = graph.getProbe();
if( probe instanceof UrlProbe) {
url =((UrlProbe) probe).getUrlAsString();
}
return url;
}
},
JDBC {
public String resolve(GraphNode graph) {
return ( (JdbcProbe) graph.getProbe()).getUrlAsString();
}
},
DISK {
public String resolve(GraphNode graph) {
return "Disk";
}
},
NETWORK {
public String resolve(GraphNode graph) {
return "Network";
}
},
TCP {
public String resolve(GraphNode graph) {
return "TCP";
}
},
SERVICES {
public String resolve(GraphNode graph) {
return "Services";
}
},
没有合适的资源?快使用搜索试试~ 我知道了~
mycat-web、mycat-eye
4星 · 超过85%的资源 需积分: 50 89 下载量 199 浏览量
2016-04-04
23:09:44
上传
评论
收藏 51.88MB GZ 举报
温馨提示
共1692个文件
class:460个
java:250个
xml:238个
分布式中间件软件mycat的管理平台,mycat-web或者mycat-eye,里面有sql审核sql验证等等一系列功能。
资源推荐
资源详情
资源评论
收起资源包目录
mycat-web、mycat-eye (1692个子文件)
GraphDesc.class 28KB
Probe.class 26KB
HostBuilder.class 22KB
ParamsBean.class 22KB
HostsList.class 21KB
ZookeeperCuratorHandler.class 20KB
PropertiesManager.class 19KB
Util.class 19KB
JMServer.class 17KB
ProbeDesc.class 14KB
ZkConfigService.class 12KB
SnmpDiscoverAgent.class 12KB
JdbcTableColumnProbe.class 11KB
PowerJdbcProbe.class 11KB
DataSourceUtils.class 11KB
ConfigObjectFactory.class 10KB
MySqlRepService.class 10KB
JMConnManager.class 10KB
DispatcherAction.class 10KB
JdbcProbe.class 9KB
ArgFactory.class 9KB
AbstractJrdsNode.class 9KB
EnumerateWikiProbes.class 9KB
Graph.class 9KB
Loader.class 9KB
JrdsElement.class 9KB
Ldap.class 9KB
GraphDescBuilder.class 9KB
StarterNode.class 9KB
HttpProbe.class 9KB
ShowService.class 9KB
Ribcl.class 9KB
Graph.class 8KB
GenericJdbcProbe.class 8KB
BootStrap.class 8KB
DiscoverAgent.class 8KB
Discover.class 8KB
WhichLibs.class 8KB
Base64.class 8KB
JSonTree.class 8KB
Period.class 8KB
JrdsXmlRpcServlet.class 8KB
ProbeDescBuilder.class 8KB
Jetty.class 8KB
XmlProvider.class 7KB
ConfigObjectBuilder.class 7KB
DoSnmpProbe.class 7KB
Timer.class 7KB
JMX.class 7KB
ProcessInfoExtended.class 7KB
JMXConnection.class 7KB
SnmpConnection.class 7KB
AbstractConfigSevice.class 7KB
Download.class 7KB
ProbeFactory.class 7KB
CheckJar.class 7KB
HttpXml.class 7KB
Varnish.class 6KB
GraphTree.class 6KB
TrapListener.class 6KB
JrdsDocument.class 6KB
SNMPService.class 6KB
SnmpVars.class 6KB
SnmpProbe.class 6KB
RdsIndexedSnmpRrd.class 6KB
JSonData.class 6KB
MycatService.class 6KB
ExternalCmdProbe.class 6KB
GraphNode.class 6KB
Renderer.class 6KB
JSonPack.class 6KB
Upload.class 6KB
Status.class 5KB
MysqlService.class 5KB
Renderer$RendererRun.class 5KB
JMXService.class 5KB
JdbcConnection.class 5KB
ConnectionInfo.class 5KB
ZkTestReadConfig.class 5KB
MailService.class 5KB
StoreOpener.class 5KB
SnmpRequester.class 4KB
Starter.class 4KB
CommandStarterImpl.class 4KB
JSonGraph.class 4KB
MailConfigUtils.class 4KB
LBServer.class 4KB
JSonQueryParams.class 4KB
Updater.class 4KB
ApacheStatus.class 4KB
TabBuilder.class 4KB
Threshold.class 4KB
Last.class 4KB
PassiveProbe.class 4KB
StartListener.class 4KB
Grapher.class 4KB
CheckValues.class 4KB
FilterBuilder.class 4KB
TaskStartupListener.class 4KB
SumBuilder.class 4KB
共 1692 条
- 1
- 2
- 3
- 4
- 5
- 6
- 17
资源评论
- 哈希20162018-01-12不好用,,运行不起来
- doudou_7152018-02-24挺好的,不错的资源
- 张亚林2019-07-21质量一般不值这个分,关键是还没有目录
- q7797194512018-11-20挺好的,不错的资源
- blacart2017-11-17很好。是官方版本
九月茅桃
- 粉丝: 5803
- 资源: 36
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- IMG_20240425_120538.jpg
- My Complete Genome_6k Base-Pairs of Phenotype SNPs_Complete Raw Data.zip
- qt 的mqtt测试demo
- 移动应用开发教程-zip.zip
- mosquitto-2.018-install-windows-x64
- FTPServer FTP 服务器,绿色免安装,单文件
- 梦畅语音点名软件,上课点名
- 利用ADNI数据集和标签,在tensorflow框架上使用tensorlayer接口,通过架构u-net实现海马体的分割
- Kutools for Word v9.0 office word 插件
- 修复Windows 10 LTSC 2021资源占用率高
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功