public class MetricTrigger extends TriggerBase
| Modifier and Type | Class and Description |
|---|---|
static class |
MetricTrigger.MetricBreachedEvent |
actions, cloudManager, enabled, eventType, isClosed, lastState, loader, name, processorRef, properties, requiredProperties, stateManager, validProperties, waitForSecond| Constructor and Description |
|---|
MetricTrigger(String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(SolrResourceLoader loader,
SolrCloudManager cloudManager,
Map<String,Object> properties)
Called when trigger is created but before it's initialized or scheduled for use.
|
protected Map<String,Object> |
getState()
Prepare and return internal state of this trigger in a format suitable for persisting in ZK.
|
void |
restoreState(AutoScaling.Trigger old)
Set internal state of this trigger from another instance.
|
void |
run() |
protected void |
setState(Map<String,Object> state)
Restore internal state of this trigger from properties retrieved from ZK.
|
close, deepCopyState, equals, getActions, getEventType, getName, getProcessor, getProperties, getWaitForSecond, hashCode, init, isClosed, isEnabled, restoreState, saveState, setProcessorpublic MetricTrigger(String name)
public void configure(SolrResourceLoader loader, SolrCloudManager cloudManager, Map<String,Object> properties) throws TriggerValidationException
AutoScaling.Triggerconfigure in interface AutoScaling.Triggerconfigure in class TriggerBaseproperties - configuration propertiesTriggerValidationException - contains details of invalid configuration parameters.protected Map<String,Object> getState()
TriggerBasegetState in class TriggerBaseUtils.toJSON(Object).protected void setState(Map<String,Object> state)
TriggerBasesetState in class TriggerBasestate - never null but may be empty.public void restoreState(AutoScaling.Trigger old)
AutoScaling.Triggerpublic void run()
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.