public abstract class TriggerListenerBase extends Object implements TriggerListener
TriggerListener.| Modifier and Type | Field and Description |
|---|---|
protected SolrCloudManager |
cloudManager |
protected AutoScalingConfig.TriggerListenerConfig |
config |
protected boolean |
enabled |
protected SolrResourceLoader |
loader |
protected Set<String> |
requiredProperties
Set of required property names.
|
protected Set<String> |
validProperties
Set of valid property names.
|
protected Set<String> |
validPropertyPrefixes
Subclasses can add to this set if they want to allow arbitrary properties that
start with one of valid prefixes.
|
| Modifier | Constructor and Description |
|---|---|
protected |
TriggerListenerBase() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
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
TriggerListener.onEvent(TriggerEvent, TriggerEventProcessorStage, String, ActionContext, Throwable, String)
method should not be called. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonEventprotected AutoScalingConfig.TriggerListenerConfig config
protected SolrCloudManager cloudManager
protected SolrResourceLoader loader
protected boolean enabled
protected final Set<String> validProperties
TriggerUtils.validProperties(Set, String...)protected final Set<String> requiredProperties
TriggerUtils.requiredProperties(Set, Set, String...)
(required properties are also valid properties).public void configure(SolrResourceLoader loader, SolrCloudManager cloudManager, AutoScalingConfig.TriggerListenerConfig config) throws TriggerValidationException
TriggerListenerconfigure in interface TriggerListenerloader - loader to use for instantiating sub-componentscloudManager - current instance of SolrCloudManagerconfig - conigurationTriggerValidationException - contains details of invalid configuration parameters.public AutoScalingConfig.TriggerListenerConfig getConfig()
getConfig in interface TriggerListenerpublic boolean isEnabled()
TriggerListenerTriggerListener.onEvent(TriggerEvent, TriggerEventProcessorStage, String, ActionContext, Throwable, String)
method should not be called.isEnabled in interface TriggerListenerpublic void init()
throws Exception
init in interface TriggerListenerExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.