public interface

ElasticInstanceSchedule

implements BambooObject
com.atlassian.bamboo.agent.elastic.schedule.ElasticInstanceSchedule
Known Indirect Subclasses

Class Overview

Represents an schedule to attempt to manage the number of elastic agents

Summary

Public Methods
@NotNull ActiveInstanceAdjustmentType getActiveInstanceAdjustmentType()
Whether to bring # of instances to = or ==.
@Nullable String getCronExpression()
Cron expression representing when the logic should be run
@Nullable ElasticImageConfiguration getElasticImageConfiguration()
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 getTargetActiveInstances()
Postive integer for # of active instances to have
boolean isAllElasticConfigurations()
Does this scheudle apply for all instances?
boolean isEnabled()
Is this schedule enabled or not
boolean isRunOnStartup()
if the schedule should be run on startup
void setActiveInstanceAdjustmentType(ActiveInstanceAdjustmentType activeInstanceAdjustmentType)
void setCronExpression(String cronExpression)
void setElasticImageConfiguration(ElasticImageConfiguration elasticImageConfiguration)
void setEnabled(boolean enabled)
void setTargetActiveInstances(int targetActiveInstances)
[Expand]
Inherited Methods
From interface com.atlassian.bamboo.core.BambooIdProvider
From interface com.atlassian.bamboo.core.BambooObject

Public Methods

@NotNull public ActiveInstanceAdjustmentType getActiveInstanceAdjustmentType ()

Whether to bring # of instances to = or ==. Defaults to ActiveInstanceAdjustmentType.EQUALS

@Nullable public String 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

@Nullable public ElasticImageConfiguration 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

public int getNumberToAdjust (int currentInstances)

Given the curent instance count, by how many agents do we need to adjust by?

Returns
  • +n number means to start n agents. -x means shut down x agents. 0 means do nothing

public int getTargetActiveInstances ()

Postive integer for # of active instances to have

public boolean isAllElasticConfigurations ()

Does this scheudle apply for all instances?

public boolean isEnabled ()

Is this schedule enabled or not

public boolean isRunOnStartup ()

if the schedule should be run on startup

public void setActiveInstanceAdjustmentType (ActiveInstanceAdjustmentType activeInstanceAdjustmentType)

public void setCronExpression (String cronExpression)

public void setElasticImageConfiguration (ElasticImageConfiguration elasticImageConfiguration)

public void setEnabled (boolean enabled)

public void setTargetActiveInstances (int targetActiveInstances)