public class ScheduledTriggers extends Object implements Closeable
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_ACTION_THROTTLE_PERIOD_SECONDS
Deprecated.
|
static int |
DEFAULT_COOLDOWN_PERIOD_SECONDS
Deprecated.
|
static int |
DEFAULT_SCHEDULED_TRIGGER_DELAY_SECONDS
Deprecated.
|
static int |
DEFAULT_TRIGGER_CORE_POOL_SIZE
Deprecated.
|
protected static Random |
RANDOM
Deprecated.
|
Constructor and Description |
---|
ScheduledTriggers(SolrResourceLoader loader,
SolrCloudManager cloudManager)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
add(AutoScaling.Trigger newTrigger)
Deprecated.
Adds a new trigger or replaces an existing one.
|
void |
addAdditionalListener(TriggerListener listener)
Deprecated.
Add a temporary listener for internal use (tests, simulation).
|
void |
close()
Deprecated.
|
Set<String> |
getScheduledTriggerNames()
Deprecated.
|
AutoScaling.Trigger |
getTrigger(String name)
Deprecated.
For use in white/grey box testing: The Trigger returned may be inspected,
but should not be modified in any way.
|
void |
pauseTriggers()
Deprecated.
Pauses all scheduled trigger invocations without interrupting any that are in progress
|
void |
remove(String triggerName)
Deprecated.
Removes and stops the trigger with the given name.
|
void |
removeAdditionalListener(TriggerListener listener)
Deprecated.
Remove a temporary listener for internal use (tests, simulation).
|
void |
removeAll()
Deprecated.
Remove and stop all triggers.
|
void |
resumeTriggers(long afterDelayMillis)
Deprecated.
Resumes all previously cancelled triggers to be scheduled after the given initial delay
|
void |
setAutoScalingConfig(AutoScalingConfig autoScalingConfig)
Deprecated.
Set the current autoscaling config.
|
public static final int DEFAULT_SCHEDULED_TRIGGER_DELAY_SECONDS
public static final int DEFAULT_ACTION_THROTTLE_PERIOD_SECONDS
public static final int DEFAULT_COOLDOWN_PERIOD_SECONDS
public static final int DEFAULT_TRIGGER_CORE_POOL_SIZE
protected static final Random RANDOM
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) throws Exception
newTrigger
- the trigger to be managedAlreadyClosedException
- if this class has already been closedException
public void pauseTriggers()
public void resumeTriggers(long afterDelayMillis)
afterDelayMillis
- the initial delay in milliseconds after which triggers should be resumedpublic void removeAll()
public void remove(String triggerName)
triggerName
- the name of the trigger to be removedpublic Set<String> getScheduledTriggerNames()
public AutoScaling.Trigger getTrigger(String name)
name
- the name of an existing triggerpublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public void addAdditionalListener(TriggerListener listener)
listener
- listener instancepublic void removeAdditionalListener(TriggerListener listener)
listener
- listener instanceCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.