public class ScheduledTriggers extends Object implements Closeable
| Constructor and Description |
|---|
ScheduledTriggers(ZkController zkController) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(AutoScaling.Trigger newTrigger)
Adds a new trigger or replaces an existing one.
|
void |
close() |
Set<String> |
getScheduledTriggerNames() |
void |
remove(String triggerName)
Removes and stops the trigger with the given name.
|
void |
setAutoScalingConfig(AutoScalingConfig autoScalingConfig)
Set the current autoscaling config.
|
public ScheduledTriggers(ZkController zkController)
public void setAutoScalingConfig(AutoScalingConfig autoScalingConfig)
OverseerTriggerThread when autoscaling.json is updated,
and it re-initializes trigger listeners.autoScalingConfig - current autoscaling.jsonpublic void add(AutoScaling.Trigger newTrigger)
newTrigger - the trigger to be managedAlreadyClosedException - if this class has already been closedpublic void remove(String triggerName)
triggerName - the name of the trigger to be removedpublic Set<String> getScheduledTriggerNames()
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2000-2017 Apache Software Foundation. All Rights Reserved.