public class MetricCollectionTrigger extends Object
TriggerVariantMetricCollectionEvents and turns them into one TriggerMetricCollectionEvent.
Since TriggerMetricCollectionEvent should be send exactly once, it maintains set of IDs that metrics processing was started for.
It also rechecks in DB whether metrics processing already started.
When metrics processing is starting, it broadcast that information via a topic to nodes in the cluster.| Constructor and Description |
|---|
MetricCollectionTrigger() |
| Modifier and Type | Method and Description |
|---|---|
void |
markMetricsProcessingAsStarted(MetricsProcessingStartedEvent event) |
void |
tryToStartMetricCollection(TriggerVariantMetricCollectionEvent event)
Receives
TriggerVariantMetricCollectionEvent event from JMS and determines whether a TriggerMetricCollectionEvent should be sent as reaction or not. |
public void tryToStartMetricCollection(@Observes
TriggerVariantMetricCollectionEvent event)
TriggerVariantMetricCollectionEvent event from JMS and determines whether a TriggerMetricCollectionEvent should be sent as reaction or not.
It check with shared Set of IDs that metrics processing already started for, and if no record is there, it rechecks in DB.event - the event dequeued from JMSpublic void markMetricsProcessingAsStarted(@Observes
MetricsProcessingStartedEvent event)
throws javax.jms.JMSException
javax.jms.JMSExceptionCopyright © 2016 JBoss by Red Hat. All Rights Reserved.