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

All Known Implementing Classes:
ElasticInstanceScheduleManagerImpl

public interface ElasticInstanceScheduleManager

Manages the cron schedule for bringing up & down elastic instances


Method Summary
 ElasticInstanceSchedule getElasticInstanceSchedule(long elasticInstanceScheduleId)
          Gets the schedule associated with that id.
 java.util.List<ElasticInstanceSchedule> getElasticInstanceSchedules()
          Returns all schedules available in the system (enabled and disabled)
 java.util.List<ElasticInstanceSchedule> getElasticInstanceSchedules(ElasticImageConfiguration elasticImageConfiguration)
          Returns schedules related to ElasticImageConfiguration (both enabled and disabled)
 void removeElasticInstanceSchedule(ElasticInstanceSchedule schedule)
          Remove schedule and associated cron trigger
 void removeElasticInstanceSchedule(long elasticInstanceScheduleId)
          Remove schedule and associated cron trigger
 void saveElasticInstanceSchedule(ElasticInstanceSchedule schedule)
          Updates or creates the schedule.
 

Method Detail

getElasticInstanceSchedules

@NotNull
java.util.List<ElasticInstanceSchedule> getElasticInstanceSchedules()
Returns all schedules available in the system (enabled and disabled)

Returns:
Empty list if no schedules are found

getElasticInstanceSchedules

@NotNull
java.util.List<ElasticInstanceSchedule> getElasticInstanceSchedules(@NotNull
                                                                            ElasticImageConfiguration elasticImageConfiguration)
Returns schedules related to ElasticImageConfiguration (both enabled and disabled)

Returns:
List of ElasticInstanceSchedule or empty list if nothing was found

getElasticInstanceSchedule

@Nullable
ElasticInstanceSchedule getElasticInstanceSchedule(long elasticInstanceScheduleId)
Gets the schedule associated with that id. null if none can be found for the id

Parameters:
elasticInstanceScheduleId -
Returns:

saveElasticInstanceSchedule

void saveElasticInstanceSchedule(ElasticInstanceSchedule schedule)
Updates or creates the schedule. If id is -1, then a new schedule will be created (with the new id updated in the parameter). The appropriate cron trigger will also be updated.

Parameters:
schedule - schedule to be saved

removeElasticInstanceSchedule

void removeElasticInstanceSchedule(@NotNull
                                   ElasticInstanceSchedule schedule)
Remove schedule and associated cron trigger

Parameters:
schedule - schedule to remove

removeElasticInstanceSchedule

void removeElasticInstanceSchedule(long elasticInstanceScheduleId)
Remove schedule and associated cron trigger

Parameters:
elasticInstanceScheduleId - id of schedule to remove


Copyright © 2011 Atlassian. All Rights Reserved.