use of com.adobe.acs.commons.httpcache.config.HttpCacheConfig in project acs-aem-commons by Adobe-Consulting-Services.
the class HttpCacheEngineImpl method getRegisteredHttpCacheConfigs.
@Override
public TabularData getRegisteredHttpCacheConfigs() throws OpenDataException {
// @formatter:off
// Exposing all google guava stats.
final CompositeType cacheEntryType = new CompositeType(JMX_PN_HTTPCACHE_CONFIG, JMX_PN_HTTPCACHE_CONFIG, new String[] { JMX_PN_ORDER, JMX_PN_OSGICOMPONENT }, new String[] { JMX_PN_ORDER, JMX_PN_OSGICOMPONENT }, new OpenType[] { SimpleType.INTEGER, SimpleType.STRING });
final TabularDataSupport tabularData = new TabularDataSupport(new TabularType(JMX_PN_HTTPCACHE_CONFIGS, JMX_PN_HTTPCACHE_CONFIGS, cacheEntryType, new String[] { JMX_PN_OSGICOMPONENT }));
for (HttpCacheConfig cacheConfig : this.cacheConfigs) {
final Map<String, Object> row = new HashMap<String, Object>();
Map<String, Object> osgiConfig = cacheConfigConfigs.get(cacheConfig);
row.put(JMX_PN_ORDER, cacheConfig.getOrder());
row.put(JMX_PN_OSGICOMPONENT, (String) osgiConfig.get(Constants.SERVICE_PID));
tabularData.put(new CompositeDataSupport(cacheEntryType, row));
}
return tabularData;
}
Aggregations