Interface ElasticInstanceSchedule
- All Superinterfaces:
BambooIdProvider
,BambooObject
- All Known Implementing Classes:
ElasticInstanceScheduleImpl
Represents an schedule to attempt to manage the number of elastic agents
-
Method Summary
Modifier and TypeMethodDescription@NotNull ActiveInstanceAdjustmentType
Whether to bring # of instances to <=, >= or ==.@Nullable String
Cron expression representing when the logic should be run@Nullable ElasticImageConfiguration
The Elastic Configuration that will be managed.int
getNumberToAdjust
(int currentInstances) Given the curent instance count, by how many agents do we need to adjust by?int
Postive integer for # of active instances to haveboolean
Does this scheudle apply for all instances?boolean
Is this schedule enabled or notboolean
if the schedule should be run on startupvoid
setActiveInstanceAdjustmentType
(ActiveInstanceAdjustmentType activeInstanceAdjustmentType) void
setCronExpression
(String cronExpression) void
setElasticImageConfiguration
(ElasticImageConfiguration elasticImageConfiguration) void
setEnabled
(boolean enabled) void
setTargetActiveInstances
(int targetActiveInstances) Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
-
Method Details
-
isEnabled
boolean isEnabled()Is this schedule enabled or not- Returns:
-
getCronExpression
Cron expression representing when the logic should be run- Returns:
- may return null. Null will mean that the schedule will be run on start up
-
getElasticImageConfiguration
The Elastic Configuration that will be managed. If null, it means schedule will be applied for all / any elastic configuration- Returns:
- may be null. Null means schedule will be applied for all / any elastic configuration
-
getActiveInstanceAdjustmentType
Whether to bring # of instances to <=, >= or ==. Defaults toActiveInstanceAdjustmentType.EQUALS
- Returns:
-
getTargetActiveInstances
int getTargetActiveInstances()Postive integer for # of active instances to have- Returns:
-
isRunOnStartup
boolean isRunOnStartup()if the schedule should be run on startup -
isAllElasticConfigurations
boolean isAllElasticConfigurations()Does this scheudle apply for all instances? -
setCronExpression
-
setElasticImageConfiguration
-
setActiveInstanceAdjustmentType
-
setTargetActiveInstances
void setTargetActiveInstances(int targetActiveInstances) -
getNumberToAdjust
int getNumberToAdjust(int currentInstances) Given the curent instance count, by how many agents do we need to adjust by?- Parameters:
currentInstances
-- Returns:
- +n number means to start n agents. -x means shut down x agents. 0 means do nothing
-
setEnabled
void setEnabled(boolean enabled)
-