Refine search
@Override public TabularData getConnectionList() throws JMException { CompositeType rowType = JdbcConnectionStat.Entry.getCompositeType(); String[] indexNames = rowType.keySet().toArray(new String[rowType.keySet().size()]); TabularType tabularType = new TabularType("ConnectionListStatistic", "ConnectionListStatistic", rowType, indexNames); TabularData data = new TabularDataSupport(tabularType); for (Map.Entry<Long, JdbcConnectionStat.Entry> entry : getConnections().entrySet()) { data.put(entry.getValue().getCompositeData()); } return data; }
@Override public TabularData getSqlList() throws JMException { Map<String, JdbcSqlStat> sqlStatMap = this.getSqlStatMap(); CompositeType rowType = JdbcSqlStat.getCompositeType(); String[] indexNames = rowType.keySet().toArray(new String[rowType.keySet().size()]); TabularType tabularType = new TabularType("SqlListStatistic", "SqlListStatistic", rowType, indexNames); TabularData data = new TabularDataSupport(tabularType); for (Map.Entry<String, JdbcSqlStat> entry : sqlStatMap.entrySet()) { data.put(entry.getValue().getCompositeData()); } return data; }
public TabularData getDataSourceList() throws JMException { CompositeType rowType = getDruidDataSourceCompositeType(); String[] indexNames = rowType.keySet().toArray(new String[rowType.keySet().size()]); TabularType tabularType = new TabularType("DruidDataSourceStat", "DruidDataSourceStat", rowType, indexNames); TabularData data = new TabularDataSupport(tabularType); final Set<Object> dataSources = getInstances().keySet(); for (Object dataSource : dataSources) { data.put(getCompositeData(dataSource)); } return data; }
@Override public TabularData getDataSourceList() throws JMException { CompositeType rowType = getDataSourceCompositeType(); String[] indexNames = rowType.keySet().toArray(new String[rowType.keySet().size()]); TabularType tabularType = new TabularType("DataSourceStat", "DataSourceStat", rowType, indexNames); TabularData data = new TabularDataSupport(tabularType); { final ConcurrentMap<String, DataSourceProxyImpl> dataSources = DruidDriver.getProxyDataSources(); for (DataSourceProxyImpl dataSource : dataSources.values()) { data.put(dataSource.getCompositeData()); } } final Set<DruidDataSource> dataSources = DruidDataSourceStatManager.getDruidDataSourceInstances(); for (DruidDataSource dataSource : dataSources) { data.put(dataSource.getCompositeData()); } return data; }
public TabularData getConnectionList() throws JMException { CompositeType rowType = JdbcConnectionStat.Entry.getCompositeType(); String[] indexNames = rowType.keySet().toArray(new String[rowType.keySet().size()]); TabularType tabularType = new TabularType("ConnectionList", "ConnectionList", rowType, indexNames); TabularData data = new TabularDataSupport(tabularType); final ConcurrentMap<String, DataSourceProxyImpl> dataSources = DruidDriver.getProxyDataSources(); for (DataSourceProxyImpl dataSource : dataSources.values()) { JdbcDataSourceStat dataSourceStat = dataSource.getDataSourceStat(); ConcurrentMap<Long, JdbcConnectionStat.Entry> connections = dataSourceStat.getConnections(); for (Map.Entry<Long, JdbcConnectionStat.Entry> entry : connections.entrySet()) { data.put(entry.getValue().getCompositeData()); } } for (DruidDataSource instance : DruidDataSourceStatManager.getDruidDataSourceInstances()) { JdbcDataSourceStat dataSourceStat = instance.getDataSourceStat(); ConcurrentMap<Long, JdbcConnectionStat.Entry> connections = dataSourceStat.getConnections(); for (Map.Entry<Long, JdbcConnectionStat.Entry> entry : connections.entrySet()) { data.put(entry.getValue().getCompositeData()); } } return data; }
public TabularData getSlowConsumers() throws OpenDataException { OpenTypeSupport.OpenTypeFactory factory = OpenTypeSupport.getFactory(SlowConsumerEntry.class); CompositeType ct = factory.getCompositeType(); TabularType tt = new TabularType("SlowConsumers", "Table of current slow Consumers", ct, new String[] {"subscription" }); TabularDataSupport rc = new TabularDataSupport(tt); int index = 0; Map<Subscription, SlowConsumerEntry> slowConsumers = strategy.getSlowConsumers(); for (Map.Entry<Subscription, SlowConsumerEntry> entry : slowConsumers.entrySet()) { entry.getValue().setSubscription(broker.getSubscriberObjectName(entry.getKey())); rc.put(OpenTypeSupport.convert(entry.getValue())); } return rc; }
@Override public TabularData getAllJobs() throws Exception { OpenTypeFactory factory = OpenTypeSupport.getFactory(Job.class); CompositeType ct = factory.getCompositeType(); TabularType tt = new TabularType("Scheduled Jobs", "Scheduled Jobs", ct, new String[] { "jobId" }); TabularDataSupport rc = new TabularDataSupport(tt); List<Job> jobs = this.jobScheduler.getAllJobs(); for (Job job : jobs) { rc.put(new CompositeDataSupport(ct, factory.getFields(job))); } return rc; }
public TabularData browseAsTable(SubscriptionView view) throws OpenDataException { OpenTypeFactory factory = OpenTypeSupport.getFactory(ActiveMQMessage.class); Message[] messages = getSubscriberMessages(view); CompositeType ct = factory.getCompositeType(); TabularType tt = new TabularType("MessageList", "MessageList", ct, new String[] {"JMSMessageID"}); TabularDataSupport rc = new TabularDataSupport(tt); for (int i = 0; i < messages.length; i++) { rc.put(new CompositeDataSupport(ct, factory.getFields(messages[i]))); } return rc; }
@Override public TabularData getNextScheduleJobs() throws Exception { OpenTypeFactory factory = OpenTypeSupport.getFactory(Job.class); CompositeType ct = factory.getCompositeType(); TabularType tt = new TabularType("Scheduled Jobs", "Scheduled Jobs", ct, new String[] { "jobId" }); TabularDataSupport rc = new TabularDataSupport(tt); List<Job> jobs = this.jobScheduler.getNextScheduleJobs(); for (Job job : jobs) { rc.put(new CompositeDataSupport(ct, factory.getFields(job))); } return rc; }
@Override public TabularData health() throws Exception { OpenTypeSupport.OpenTypeFactory factory = OpenTypeSupport.getFactory(HealthStatus.class); CompositeType ct = factory.getCompositeType(); TabularType tt = new TabularType("HealthStatus", "HealthStatus", ct, new String[] { "healthId", "level", "message", "resource" }); TabularDataSupport rc = new TabularDataSupport(tt); List<HealthStatus> list = healthList(); for (HealthStatus healthStatus : list) { rc.put(new CompositeDataSupport(ct, factory.getFields(healthStatus))); } return rc; }
String[] indexNames = rowType.keySet().toArray(new String[rowType.keySet().size()]); TabularType tabularType = new TabularType("SqlListStatistic", "SqlListStatistic", rowType, indexNames); TabularData data = new TabularDataSupport(tabularType);
@Override public TabularData getAllJobs(String startTime, String finishTime) throws Exception { OpenTypeFactory factory = OpenTypeSupport.getFactory(Job.class); CompositeType ct = factory.getCompositeType(); TabularType tt = new TabularType("Scheduled Jobs", "Scheduled Jobs", ct, new String[] { "jobId" }); TabularDataSupport rc = new TabularDataSupport(tt); long start = JobSupport.getDataTime(startTime); long finish = JobSupport.getDataTime(finishTime); List<Job> jobs = this.jobScheduler.getAllJobs(start, finish); for (Job job : jobs) { rc.put(new CompositeDataSupport(ct, factory.getFields(job))); } return rc; }
@Override public TabularData browseAsTable(String selector) throws OpenDataException, InvalidSelectorException { OpenTypeFactory factory = OpenTypeSupport.getFactory(ActiveMQMessage.class); Message[] messages = destination.browse(); CompositeType ct = factory.getCompositeType(); TabularType tt = new TabularType("MessageList", "MessageList", ct, new String[] { "JMSMessageID" }); TabularDataSupport rc = new TabularDataSupport(tt); NonCachedMessageEvaluationContext ctx = new NonCachedMessageEvaluationContext(); ctx.setDestination(destination.getActiveMQDestination()); BooleanExpression selectorExpression = selector == null ? null : SelectorParser.parse(selector); for (int i = 0; i < messages.length; i++) { try { if (selectorExpression == null) { rc.put(new CompositeDataSupport(ct, factory.getFields(messages[i]))); } else { ctx.setMessageReference(messages[i]); if (selectorExpression.matches(ctx)) { rc.put(new CompositeDataSupport(ct, factory.getFields(messages[i]))); } } } catch (Throwable e) { LOG.warn("exception browsing destination", e); } } return rc; }
javax.management.openmbean.SimpleType.INTEGER }); TabularType tt = new TabularType("a", "b", rt, new String[] { "a" }); TabularDataSupport t1 = new TabularDataSupport(tt); TabularDataSupport t2 = new TabularDataSupport(tt);
@Override public TabularData getConnectionList() throws JMException { CompositeType rowType = JdbcConnectionStat.Entry.getCompositeType(); String[] indexNames = rowType.keySet().toArray(new String[rowType.keySet().size()]); TabularType tabularType = new TabularType("ConnectionListStatistic", "ConnectionListStatistic", rowType, indexNames); TabularData data = new TabularDataSupport(tabularType); for (Map.Entry<Long, JdbcConnectionStat.Entry> entry : getConnections().entrySet()) { data.put(entry.getValue().getCompositeData()); } return data; }
@Override public TabularData getSqlList() throws JMException { Map<String, JdbcSqlStat> sqlStatMap = this.getSqlStatMap(); CompositeType rowType = JdbcSqlStat.getCompositeType(); String[] indexNames = rowType.keySet().toArray(new String[rowType.keySet().size()]); TabularType tabularType = new TabularType("SqlListStatistic", "SqlListStatistic", rowType, indexNames); TabularData data = new TabularDataSupport(tabularType); for (Map.Entry<String, JdbcSqlStat> entry : sqlStatMap.entrySet()) { data.put(entry.getValue().getCompositeData()); } return data; }
public TabularData getDataSourceList() throws JMException { CompositeType rowType = getDruidDataSourceCompositeType(); String[] indexNames = rowType.keySet().toArray(new String[rowType.keySet().size()]); TabularType tabularType = new TabularType("DruidDataSourceStat", "DruidDataSourceStat", rowType, indexNames); TabularData data = new TabularDataSupport(tabularType); final Set<Object> dataSources = getInstances().keySet(); for (Object dataSource : dataSources) { data.put(getCompositeData(dataSource)); } return data; }
@Override public TabularData getDataSourceList() throws JMException { CompositeType rowType = getDataSourceCompositeType(); String[] indexNames = rowType.keySet().toArray(new String[rowType.keySet().size()]); TabularType tabularType = new TabularType("DataSourceStat", "DataSourceStat", rowType, indexNames); TabularData data = new TabularDataSupport(tabularType); { final ConcurrentMap<String, DataSourceProxyImpl> dataSources = DruidDriver.getProxyDataSources(); for (DataSourceProxyImpl dataSource : dataSources.values()) { data.put(dataSource.getCompositeData()); } } final Set<DruidDataSource> dataSources = DruidDataSourceStatManager.getDruidDataSourceInstances(); for (DruidDataSource dataSource : dataSources) { data.put(dataSource.getCompositeData()); } return data; }
public TabularData getConnectionList() throws JMException { CompositeType rowType = JdbcConnectionStat.Entry.getCompositeType(); String[] indexNames = rowType.keySet().toArray(new String[rowType.keySet().size()]); TabularType tabularType = new TabularType("ConnectionList", "ConnectionList", rowType, indexNames); TabularData data = new TabularDataSupport(tabularType); final ConcurrentMap<String, DataSourceProxyImpl> dataSources = DruidDriver.getProxyDataSources(); for (DataSourceProxyImpl dataSource : dataSources.values()) { JdbcDataSourceStat dataSourceStat = dataSource.getDataSourceStat(); ConcurrentMap<Long, JdbcConnectionStat.Entry> connections = dataSourceStat.getConnections(); for (Map.Entry<Long, JdbcConnectionStat.Entry> entry : connections.entrySet()) { data.put(entry.getValue().getCompositeData()); } } for (DruidDataSource instance : DruidDataSourceStatManager.getDruidDataSourceInstances()) { JdbcDataSourceStat dataSourceStat = instance.getDataSourceStat(); ConcurrentMap<Long, JdbcConnectionStat.Entry> connections = dataSourceStat.getConnections(); for (Map.Entry<Long, JdbcConnectionStat.Entry> entry : connections.entrySet()) { data.put(entry.getValue().getCompositeData()); } } return data; }
String[] indexNames = rowType.keySet().toArray(new String[rowType.keySet().size()]); TabularType tabularType = new TabularType("SqlListStatistic", "SqlListStatistic", rowType, indexNames); TabularData data = new TabularDataSupport(tabularType);