Search in sources :

Example 1 with ActivationInterceptor

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;
}
Also used : ActivationInterceptor(org.infinispan.interceptors.ActivationInterceptor) PathAddress(org.jboss.as.controller.PathAddress)

Aggregations

ActivationInterceptor (org.infinispan.interceptors.ActivationInterceptor)1 PathAddress (org.jboss.as.controller.PathAddress)1