public class NodeAddedTrigger extends TriggerBase
TriggerEventType.NODEADDED
eventModifier 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, setProcessor
public NodeAddedTrigger(String name)
public void init() throws Exception
AutoScaling.Trigger
init
in interface AutoScaling.Trigger
init
in class TriggerBase
Exception
public void configure(SolrResourceLoader loader, SolrCloudManager cloudManager, Map<String,Object> properties) throws TriggerValidationException
AutoScaling.Trigger
configure
in interface AutoScaling.Trigger
configure
in class TriggerBase
properties
- configuration propertiesTriggerValidationException
- contains details of invalid configuration parameters.public void restoreState(AutoScaling.Trigger old)
AutoScaling.Trigger
protected Map<String,Object> getState()
TriggerBase
getState
in class TriggerBase
Utils.toJSON(Object)
.protected void setState(Map<String,Object> state)
TriggerBase
setState
in class TriggerBase
state
- never null but may be empty.public void run()
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.