Search in sources :

Example 1 with MetricFunction

use of org.jboss.as.clustering.controller.MetricFunction in project wildfly by wildfly.

the class RemoteCacheMetricExecutor method execute.

@Override
public ModelNode execute(OperationContext context, Metric<RemoteCacheClientStatisticsMXBean> metric) throws OperationFailedException {
    ServiceName name = InfinispanClientRequirement.REMOTE_CONTAINER.getServiceName(context, UnaryCapabilityNameResolver.PARENT);
    FunctionExecutor<RemoteCacheContainer> executor = this.executors.get(name);
    return (executor != null) ? executor.execute(new MetricFunction<>(new RemoteCacheClientStatisticsFactory(context.getCurrentAddressValue()), metric)) : null;
}
Also used : RemoteCacheContainer(org.wildfly.clustering.infinispan.client.RemoteCacheContainer) ServiceName(org.jboss.msc.service.ServiceName) MetricFunction(org.jboss.as.clustering.controller.MetricFunction)

Example 2 with MetricFunction

use of org.jboss.as.clustering.controller.MetricFunction in project wildfly by wildfly.

the class CacheMetricExecutor method execute.

@Override
public ModelNode execute(OperationContext context, Metric<C> metric) throws OperationFailedException {
    ServiceName name = InfinispanCacheRequirement.CACHE.getServiceName(context, this.resolver);
    FunctionExecutor<Cache<?, ?>> executor = this.executors.get(name);
    return (executor != null) ? executor.execute(new MetricFunction<>(this, metric)) : null;
}
Also used : ServiceName(org.jboss.msc.service.ServiceName) MetricFunction(org.jboss.as.clustering.controller.MetricFunction) Cache(org.infinispan.Cache)

Example 3 with MetricFunction

use of org.jboss.as.clustering.controller.MetricFunction in project wildfly by wildfly.

the class CacheContainerMetricExecutor method execute.

@Override
public ModelNode execute(OperationContext context, Metric<EmbeddedCacheManager> metric) throws OperationFailedException {
    ServiceName name = InfinispanRequirement.CONTAINER.getServiceName(context, UnaryCapabilityNameResolver.DEFAULT);
    FunctionExecutor<EmbeddedCacheManager> executor = this.executors.get(name);
    return (executor != null) ? executor.execute(new MetricFunction<>(Function.identity(), metric)) : null;
}
Also used : ServiceName(org.jboss.msc.service.ServiceName) MetricFunction(org.jboss.as.clustering.controller.MetricFunction) EmbeddedCacheManager(org.infinispan.manager.EmbeddedCacheManager)

Example 4 with MetricFunction

use of org.jboss.as.clustering.controller.MetricFunction in project wildfly by wildfly.

the class RemoteCacheContainerMetricExecutor method execute.

@Override
public ModelNode execute(OperationContext context, Metric<RemoteCacheManagerMXBean> metric) throws OperationFailedException {
    ServiceName name = InfinispanClientRequirement.REMOTE_CONTAINER.getServiceName(context, UnaryCapabilityNameResolver.DEFAULT);
    FunctionExecutor<RemoteCacheContainer> executor = this.executors.get(name);
    return (executor != null) ? executor.execute(new MetricFunction<>(Functions.identity(), metric)) : null;
}
Also used : RemoteCacheContainer(org.wildfly.clustering.infinispan.client.RemoteCacheContainer) ServiceName(org.jboss.msc.service.ServiceName) MetricFunction(org.jboss.as.clustering.controller.MetricFunction)

Example 5 with MetricFunction

use of org.jboss.as.clustering.controller.MetricFunction in project wildfly by wildfly.

the class ChannelMetricExecutor method execute.

@Override
public ModelNode execute(OperationContext context, Metric<JChannel> metric) throws OperationFailedException {
    ServiceName name = JGroupsRequirement.CHANNEL.getServiceName(context, UnaryCapabilityNameResolver.DEFAULT);
    FunctionExecutor<JChannel> executor = this.executors.get(name);
    return (executor != null) ? executor.execute(new MetricFunction<>(Function.identity(), metric)) : null;
}
Also used : JChannel(org.jgroups.JChannel) ServiceName(org.jboss.msc.service.ServiceName) MetricFunction(org.jboss.as.clustering.controller.MetricFunction)

Aggregations

MetricFunction (org.jboss.as.clustering.controller.MetricFunction)5 ServiceName (org.jboss.msc.service.ServiceName)5 RemoteCacheContainer (org.wildfly.clustering.infinispan.client.RemoteCacheContainer)2 Cache (org.infinispan.Cache)1 EmbeddedCacheManager (org.infinispan.manager.EmbeddedCacheManager)1 JChannel (org.jgroups.JChannel)1