public final class MonitoringDataCollection extends Object
Methods.
Only return types a known collection function has been register(Class, BiConsumer)ed for are included.
The usual usage of this helper is to call collectObject(MonitoringDataCollector, Object).| Modifier and Type | Method and Description |
|---|---|
static void |
collectObject(MonitoringDataCollector collector,
Object obj) |
static <T> void |
register(Class<T> type,
BiConsumer<MonitoringDataCollector,T> collectWith)
Can be used to plug in collection functions for types that otherwise would not be collected even for objects that
are passed to collection elsewhere.
|
public static <T> void register(Class<T> type, BiConsumer<MonitoringDataCollector,T> collectWith)
type - the type as stated by the return type of the getter method returning the value to collect from an objectcollectWith - the function to use to collect values of the given typepublic static void collectObject(MonitoringDataCollector collector, Object obj)
Copyright © 2020. All rights reserved.