Search in sources :

Example 1 with DefaultLockManager

use of org.infinispan.util.concurrent.locks.impl.DefaultLockManager in project wildfly by wildfly.

the class LockingMetricExecutor method execute.

@Override
public ModelNode execute(OperationContext context, Metric<DefaultLockManager> 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));
    return (cache != null) ? metric.execute((DefaultLockManager) cache.getAdvancedCache().getLockManager()) : null;
}
Also used : PathAddress(org.jboss.as.controller.PathAddress) DefaultLockManager(org.infinispan.util.concurrent.locks.impl.DefaultLockManager)

Aggregations

DefaultLockManager (org.infinispan.util.concurrent.locks.impl.DefaultLockManager)1 PathAddress (org.jboss.as.controller.PathAddress)1