public class ScheduledTriggers extends Object implements Closeable
Constructor and Description |
---|
ScheduledTriggers(SolrResourceLoader loader,
SolrCloudManager cloudManager) |
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(SolrResourceLoader loader, SolrCloudManager cloudManager)
public void setAutoScalingConfig(AutoScalingConfig autoScalingConfig)
OverseerTriggerThread
when autoscaling.json is updated,
and it re-initializes trigger listeners and other properties used by the frameworkautoScalingConfig
- 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 Closeable
close
in interface AutoCloseable
IOException
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.