use of javax.management.openmbean.OpenDataException in project geode by apache.
the class Region method listRegionAttributes.
@Override
public CompositeData listRegionAttributes() {
String value = JMXProperties.getInstance().getProperty(getKey("listRegionAttributes"), "");
String[] itemValues = value.split(",");
Map<String, Object> itemValuesHM = new HashMap<String, Object>();
// compressionCodec
if (null != itemValues[0]) {
itemValuesHM.put(regAttItemNames[0], itemValues[0]);
}
// enableOffHeapMemory
if (null != itemValues[1]) {
itemValuesHM.put(regAttItemNames[1], Boolean.parseBoolean(itemValues[1]));
}
// scope
if (null != itemValues[3]) {
itemValuesHM.put(regAttItemNames[3], itemValues[3]);
}
// diskStoreName
if (null != itemValues[4]) {
itemValuesHM.put(regAttItemNames[4], itemValues[4]);
}
// diskSynchronous
if (null != itemValues[5]) {
itemValuesHM.put(regAttItemNames[5], Boolean.parseBoolean(itemValues[5]));
}
CompositeData lraCompData;
try {
lraCompData = new CompositeDataSupport(listRegionAttributesCompData, itemValuesHM);
} catch (OpenDataException e) {
e.printStackTrace();
lraCompData = null;
}
return lraCompData;
}
use of javax.management.openmbean.OpenDataException in project jackrabbit-oak by apache.
the class ConsolidatedDataStoreCacheStats method getCacheStats.
@Override
public TabularData getCacheStats() {
TabularDataSupport tds;
try {
TabularType tt = new TabularType(CacheStatsData.class.getName(), "Consolidated DataStore Cache Stats", CacheStatsData.TYPE, new String[] { "name" });
tds = new TabularDataSupport(tt);
for (DataStoreCacheStatsMBean stats : cacheStats) {
tds.put(new CacheStatsData(stats).toCompositeData());
}
} catch (OpenDataException e) {
throw new IllegalStateException(e);
}
return tds;
}
use of javax.management.openmbean.OpenDataException 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.OpenDataException 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.OpenDataException 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;
}
Aggregations