use of org.infinispan.interceptors.ActivationInterceptor in project wildfly by wildfly.
the class StoreMetricExecutor method execute.
@Override
public ModelNode execute(OperationContext context, Metric<ActivationInterceptor> metric) throws OperationFailedException {
PathAddress cacheAddress = context.getCurrentAddress().getParent();
String containerName = cacheAddress.getParent().getLastElement().getValue();
String cacheName = cacheAddress.getLastElement().getValue();
Cache<?, ?> cache = ServiceContainerHelper.findValue(context.getServiceRegistry(false), InfinispanCacheRequirement.CACHE.getServiceName(context, containerName, cacheName));
if (cache != null) {
ActivationInterceptor interceptor = CacheMetric.findInterceptor(cache, ActivationInterceptor.class);
if (interceptor != null) {
return metric.execute(interceptor);
}
}
return null;
}
Aggregations