use of javax.management.openmbean.TabularDataSupport in project jackrabbit-oak by apache.
the class AbstractCheckpointMBean method listCheckpoints.
@Override
public TabularData listCheckpoints() {
try {
TabularDataSupport tab = new TabularDataSupport(new TabularType(getTypeName(), "Checkpoints", createCompositeType(), new String[] { "id" }));
collectCheckpoints(tab);
return tab;
} catch (OpenDataException e) {
throw new IllegalStateException(e);
}
}
use of javax.management.openmbean.TabularDataSupport in project jackrabbit-oak by apache.
the class ConsolidatedCacheStats method getCacheStats.
@Override
public TabularData getCacheStats() {
TabularDataSupport tds;
try {
TabularType tt = new TabularType(CacheStatsData.class.getName(), "Consolidated Cache Stats", CacheStatsData.TYPE, new String[] { "name" });
tds = new TabularDataSupport(tt);
for (CacheStatsMBean stats : cacheStats.getServices()) {
tds.put(new CacheStatsData(stats).toCompositeData());
}
for (CacheStatsMBean stats : persistentCacheStats.getServices()) {
tds.put(new CacheStatsData(stats).toCompositeData());
}
} catch (OpenDataException e) {
throw new IllegalStateException(e);
}
return tds;
}
use of javax.management.openmbean.TabularDataSupport in project jackrabbit-oak by apache.
the class PropertyIndexStats method getStatsForAllIndexes.
@Override
public TabularData getStatsForAllIndexes(String path, int maxValueCount, int maxDepth, int maxPathCount) throws OpenDataException {
String indexRootPath = concat(path, "oak:index");
NodeState idxRoot = NodeStateUtils.getNode(store.getRoot(), indexRootPath);
TabularType tt = new TabularType(PropertyIndexStats.class.getName(), "Property Index Stats", getType(), new String[] { "path" });
TabularDataSupport tds = new TabularDataSupport(tt);
for (ChildNodeEntry cne : idxRoot.getChildNodeEntries()) {
if ("property".equals(cne.getNodeState().getString("type"))) {
CompositeData stats = getStatsForIndex(concat(indexRootPath, cne.getName()), cne.getNodeState(), maxValueCount, maxDepth, maxPathCount);
tds.put(stats);
}
}
return tds;
}
use of javax.management.openmbean.TabularDataSupport in project jackrabbit-oak by apache.
the class TrackingCorruptIndexHandler method getFailingIndexStats.
//~-----------------------------------------------------< MBean Support >
public TabularData getFailingIndexStats(String asyncName) {
TabularDataSupport tds;
try {
TabularType tt = new TabularType(TrackingCorruptIndexHandler.class.getName(), "Failing Index Stats", FailingIndexStats.TYPE, new String[] { "path" });
tds = new TabularDataSupport(tt);
Map<String, CorruptIndexInfo> infos = getFailingIndexData(asyncName);
for (Map.Entry<String, CorruptIndexInfo> e : infos.entrySet()) {
FailingIndexStats stats = new FailingIndexStats(e.getValue());
tds.put(stats.toCompositeData());
}
} catch (OpenDataException e) {
throw new IllegalStateException(e);
}
return tds;
}
use of javax.management.openmbean.TabularDataSupport in project jackrabbit-oak by apache.
the class ConsolidatedListenerMBeanImpl method getListenerStats.
@Override
public TabularData getListenerStats() {
TabularDataSupport tds;
try {
int id = 0;
TabularType tt = new TabularType(ListenerStatsData.class.getName(), "Consolidated Listener Stats", ListenerStatsData.TYPE, new String[] { "index" });
tds = new TabularDataSupport(tt);
for (ListenerMBeans beans : getListenerMBeans()) {
tds.put(new ListenerStatsData(++id, beans).toCompositeData());
}
} catch (OpenDataException e) {
throw new IllegalStateException(e);
}
return tds;
}
Aggregations