Package org.jgroups.util
Class Metrics
java.lang.Object
org.jgroups.util.Metrics
Extracts all attributes and methods annotated with
ManagedAttribute and returns them
as a map of names associated with [getter-method/description tuples]. E.g. for an attribute called foo, a method
foo() or getFoo() is searched for.- Since:
- 5.4, 5.3.6
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Map<String, Metrics.Entry<Number>> extract(JChannel ch, Predicate<AccessibleObject> filter) static Map<String, Metrics.Entry<Object>> static Map<String, Metrics.Entry<Object>> extract(Protocol p, Predicate<AccessibleObject> filter) protected static booleanisNumberAndScalar(AccessibleObject obj, Class<?> cl) protected static booleanisScalar(AccessibleObject obj) static voidprotected static <T> voidprotected voidstart(boolean numeric)
-
Field Details
-
ch
-
IS_NUMBER
-
-
Constructor Details
-
Metrics
public Metrics()
-
-
Method Details
-
extract
-
extract
public static Map<String,Map<String, extractMetrics.Entry<Object>>> (JChannel ch, Predicate<AccessibleObject> filter) -
extract
-
extract
public static Map<String,Metrics.Entry<Object>> extract(Protocol p, Predicate<AccessibleObject> filter) -
start
- Throws:
Exception
-
print
-
convert
-
convertProtocol
public static Map<String,Metrics.Entry<Number>> convertProtocol(Map<String, Metrics.Entry<Object>> m) -
isNumberAndScalar
-
isScalar
-
main
- Throws:
Throwable
-