public class MetricsEventBus extends Object
| 构造器和说明 |
|---|
MetricsEventBus() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> T |
post(MetricsEvent event,
Supplier<T> targetSupplier)
Posts an event to all registered subscribers.
|
static <T> T |
post(MetricsEvent event,
Supplier<T> targetSupplier,
Function<T,Boolean> trFunction)
Full lifecycle post, success and failure conditions can be customized
|
static void |
publish(MetricsEvent event)
Posts an event to all registered subscribers and only once.
|
public static void publish(MetricsEvent event)
event - event to post.public static <T> T post(MetricsEvent event, Supplier<T> targetSupplier)
event - event to post.targetSupplier - original processing result targetSupplierpublic static <T> T post(MetricsEvent event, Supplier<T> targetSupplier, Function<T,Boolean> trFunction)
T - Biz result typeevent - event to post.targetSupplier - original processing result suppliertrFunction - Custom event success criteria, judged according to the returned boolean typeCopyright © 2011–2020 The Apache Software Foundation. All rights reserved.