Search in sources :

Example 1 with RpcManagerImpl

use of org.infinispan.remoting.rpc.RpcManagerImpl in project wildfly by wildfly.

the class ClusteredCacheMetricExecutor method execute.

@Override
public ModelNode execute(OperationContext context, Metric<RpcManagerImpl> metric) throws OperationFailedException {
    PathAddress address = context.getCurrentAddress();
    String containerName = address.getParent().getLastElement().getValue();
    String cacheName = address.getLastElement().getValue();
    Cache<?, ?> cache = ServiceContainerHelper.findValue(context.getServiceRegistry(false), InfinispanCacheRequirement.CACHE.getServiceName(context, containerName, cacheName));
    return (cache != null) ? metric.execute((RpcManagerImpl) cache.getAdvancedCache().getRpcManager()) : null;
}
Also used : RpcManagerImpl(org.infinispan.remoting.rpc.RpcManagerImpl) PathAddress(org.jboss.as.controller.PathAddress)

Aggregations

RpcManagerImpl (org.infinispan.remoting.rpc.RpcManagerImpl)1 PathAddress (org.jboss.as.controller.PathAddress)1