Interface AlarmPipeline
-
public interface AlarmPipeline
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
AlarmPipeline.RetiredCallback
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
evaluate(AlarmEvent alarmEvent, TrackingContext trackingContext)
Evaluate analarmEvent
.java.lang.String
getName()
Get the name of this pipeline.void
retire(AlarmPipeline.RetiredCallback callback)
Retire this pipeline.void
start()
Start this pipeline.void
stop()
Stop this pipeline and everything running in it immediately.
-
-
-
Method Detail
-
start
void start()
Start this pipeline. A pipeline will always be started before any calls toevaluate(AlarmEvent, TrackingContext)
happen.Set MDC keys before coming here.
-
stop
void stop()
Stop this pipeline and everything running in it immediately.Set MDC keys before coming here.
-
retire
void retire(AlarmPipeline.RetiredCallback callback)
Retire this pipeline. This differs from stopping a pipeline in that allAlarmEvent
s currently evaluating inside the pipeline should be allowed to finish. Upon completion of the last event,callback
will be notified.Set MDC keys before coming here.
- Parameters:
callback
- The callback to notify once the pipeline is empty and has finished running.
-
evaluate
void evaluate(AlarmEvent alarmEvent, TrackingContext trackingContext)
Evaluate analarmEvent
.Set MDC keys before coming here.
- Parameters:
alarmEvent
- TheAlarmEvent
to evaluate, not nulltrackingContext
- TheTrackingContext
foralarmEvent
. Update the context on transitions and when the event is finished being evaluated, not null
-
getName
@Nonnull java.lang.String getName()
Get the name of this pipeline. Used mainly to set MDC log keys- Returns:
- the pipeline name, not null
-
-