use of org.jboss.as.connector.subsystems.common.pool.PoolStatisticsRuntimeAttributeWriteHandler in project wildfly by wildfly.
the class StatisticsResourceDefinition method registerAttributes.
@Override
public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
super.registerAttributes(resourceRegistration);
for (AttributeDefinition attribute : getAttributesFromPlugin(plugin)) {
resourceRegistration.registerMetric(attribute, new PoolMetrics.ParametrizedPoolMetricsHandler(plugin));
}
//adding enable/disable for pool stats
OperationStepHandler readHandler = new PoolStatisticsRuntimeAttributeReadHandler(plugin);
OperationStepHandler writeHandler = new PoolStatisticsRuntimeAttributeWriteHandler(plugin);
resourceRegistration.registerReadWriteAttribute(org.jboss.as.connector.subsystems.common.pool.Constants.POOL_STATISTICS_ENABLED, readHandler, writeHandler);
}
Aggregations