com.atlassian.bamboo.agent.elastic.schedule
Interface ElasticInstanceSchedule

All Superinterfaces:
BambooObject
All Known Implementing Classes:
ElasticInstanceScheduleImpl

public interface ElasticInstanceSchedule
extends BambooObject

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


Method Summary
 ActiveInstanceAdjustmentType getActiveInstanceAdjustmentType()
          Whether to bring # of instances to <=, >= or ==.
 java.lang.String getCronExpression()
          Cron expression representing when the logic should be run
 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(java.lang.String cronExpression)
           
 void setElasticImageConfiguration(ElasticImageConfiguration elasticImageConfiguration)
           
 void setEnabled(boolean enabled)
           
 void setTargetActiveInstances(int targetActiveInstances)
           
 
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
getId, setId
 

Method Detail

isEnabled

boolean isEnabled()
Is this schedule enabled or not

Returns:

getCronExpression

@Nullable
java.lang.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

getElasticImageConfiguration

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

getActiveInstanceAdjustmentType

@NotNull
ActiveInstanceAdjustmentType getActiveInstanceAdjustmentType()
Whether to bring # of instances to <=, >= or ==. Defaults to ActiveInstanceAdjustmentType.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

void setCronExpression(java.lang.String cronExpression)

setElasticImageConfiguration

void setElasticImageConfiguration(ElasticImageConfiguration elasticImageConfiguration)

setActiveInstanceAdjustmentType

void setActiveInstanceAdjustmentType(ActiveInstanceAdjustmentType activeInstanceAdjustmentType)

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)


Copyright © 2010 Atlassian. All Rights Reserved.