Class MetricFunction<T,V>

java.lang.Object
org.jboss.as.clustering.controller.MetricFunction<T,V>
Type Parameters:
T - the type of value provided by the service on which the given runtime metric operates
V - the type of the value of which the given runtime metric operates
All Implemented Interfaces:
org.wildfly.common.function.ExceptionFunction<T,org.jboss.dmr.ModelNode,org.jboss.as.controller.OperationFailedException>

public class MetricFunction<T,V> extends Object implements org.wildfly.common.function.ExceptionFunction<T,org.jboss.dmr.ModelNode,org.jboss.as.controller.OperationFailedException>
A functional view of a runtime metric.
Author:
Paul Ferraro
  • Constructor Summary

    Constructors
    Constructor
    Description
    MetricFunction(Function<T,V> mapper, Metric<V> metric)
    Creates a functional view of the specified metric using the specified mapper.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.jboss.dmr.ModelNode
    apply(T value)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.wildfly.common.function.ExceptionFunction

    andThen, andThen, andThen, andThen, andThen, andThen, compose, compose
  • Constructor Details

    • MetricFunction

      public MetricFunction(Function<T,V> mapper, Metric<V> metric)
      Creates a functional view of the specified metric using the specified mapper.
      Parameters:
      mapper - maps the value of a service to the value on which the given metric operates
      metric - a runtime metric
  • Method Details

    • apply

      public org.jboss.dmr.ModelNode apply(T value) throws org.jboss.as.controller.OperationFailedException
      Specified by:
      apply in interface org.wildfly.common.function.ExceptionFunction<T,org.jboss.dmr.ModelNode,org.jboss.as.controller.OperationFailedException>
      Throws:
      org.jboss.as.controller.OperationFailedException