public class NodeAddedTrigger extends TriggerBase
TriggerEventType.NODEADDED event| Modifier and Type | Class and Description |
|---|---|
static class |
NodeAddedTrigger.NodeAddedEvent |
actions, cloudManager, enabled, eventType, isClosed, lastState, loader, name, processorRef, properties, requiredProperties, stateManager, validProperties, waitForSecond| Constructor and Description |
|---|
NodeAddedTrigger(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 |
init()
Called before a trigger is scheduled.
|
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, isClosed, isEnabled, restoreState, saveState, setProcessorpublic NodeAddedTrigger(String name)
public void init()
throws Exception
AutoScaling.Triggerinit in interface AutoScaling.Triggerinit in class TriggerBaseExceptionpublic 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.public void restoreState(AutoScaling.Trigger old)
AutoScaling.Triggerprotected 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 run()
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.