public interface TriggerListener extends Closeable
Modifier and Type | Method and Description |
---|---|
void |
configure(SolrResourceLoader loader,
SolrCloudManager cloudManager,
AutoScalingConfig.TriggerListenerConfig config)
Called when listener is created but before it's initialized and used.
|
AutoScalingConfig.TriggerListenerConfig |
getConfig() |
void |
init() |
boolean |
isEnabled()
If this method returns false then the listener's
onEvent(TriggerEvent, TriggerEventProcessorStage, String, ActionContext, Throwable, String)
method should not be called. |
void |
onEvent(TriggerEvent event,
TriggerEventProcessorStage stage,
String actionName,
ActionContext context,
Throwable error,
String message)
This method is called when either a particular
stage or
actionName is reached during event processing. |
void configure(SolrResourceLoader loader, SolrCloudManager cloudManager, AutoScalingConfig.TriggerListenerConfig config) throws TriggerValidationException
loader
- loader to use for instantiating sub-componentscloudManager
- current instance of SolrCloudManagerconfig
- conigurationTriggerValidationException
- contains details of invalid configuration parameters.boolean isEnabled()
onEvent(TriggerEvent, TriggerEventProcessorStage, String, ActionContext, Throwable, String)
method should not be called.AutoScalingConfig.TriggerListenerConfig getConfig()
void onEvent(TriggerEvent event, TriggerEventProcessorStage stage, String actionName, ActionContext context, Throwable error, String message) throws Exception
stage
or
actionName
is reached during event processing.event
- current event being processedstage
- TriggerEventProcessorStage
that this listener was registered for, or nullactionName
- TriggerAction
name that this listener was registered for, or nullcontext
- optional ActionContext
when the processing stage is related to an action, or nullerror
- optional Throwable
error, or nullmessage
- optional messageException
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.