Class ElasticInstanceScheduleManagerImpl
- java.lang.Object
-
- com.atlassian.bamboo.agent.elastic.schedule.ElasticInstanceScheduleManagerImpl
-
- All Implemented Interfaces:
ElasticInstanceScheduleManager
public class ElasticInstanceScheduleManagerImpl extends Object implements ElasticInstanceScheduleManager
-
-
Constructor Summary
Constructors Constructor Description ElasticInstanceScheduleManagerImpl(ElasticInstanceScheduleDao elasticInstanceScheduleDao, ElasticInstanceScheduleScheduler elasticInstanceScheduleScheduler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ElasticInstanceSchedule
getElasticInstanceSchedule(long elasticInstanceScheduleId)
Gets the schedule associated with that id.@NotNull List<ElasticInstanceSchedule>
getElasticInstanceSchedules()
Returns all schedules available in the system (enabled and disabled) TODO Sorting@NotNull List<ElasticInstanceSchedule>
getElasticInstanceSchedules(@NotNull ElasticImageConfiguration elasticImageConfiguration)
Returns schedules related toElasticImageConfiguration
(both enabled and disabled)void
removeElasticInstanceSchedule(long elasticInstanceScheduleId)
Remove schedule and associated cron triggervoid
removeElasticInstanceSchedule(@NotNull ElasticInstanceSchedule schedule)
Remove schedule and associated cron triggervoid
saveElasticInstanceSchedule(ElasticInstanceSchedule schedule)
Updates or creates the schedule.
-
-
-
Constructor Detail
-
ElasticInstanceScheduleManagerImpl
public ElasticInstanceScheduleManagerImpl(ElasticInstanceScheduleDao elasticInstanceScheduleDao, ElasticInstanceScheduleScheduler elasticInstanceScheduleScheduler)
-
-
Method Detail
-
getElasticInstanceSchedules
@NotNull public @NotNull List<ElasticInstanceSchedule> getElasticInstanceSchedules()
Description copied from interface:ElasticInstanceScheduleManager
Returns all schedules available in the system (enabled and disabled) TODO Sorting- Specified by:
getElasticInstanceSchedules
in interfaceElasticInstanceScheduleManager
- Returns:
- Empty list if no schedules are found
-
getElasticInstanceSchedules
@NotNull public @NotNull List<ElasticInstanceSchedule> getElasticInstanceSchedules(@NotNull @NotNull ElasticImageConfiguration elasticImageConfiguration)
Description copied from interface:ElasticInstanceScheduleManager
Returns schedules related toElasticImageConfiguration
(both enabled and disabled)- Specified by:
getElasticInstanceSchedules
in interfaceElasticInstanceScheduleManager
- Returns:
- List of
ElasticInstanceSchedule
or empty list if nothing was found
-
getElasticInstanceSchedule
public ElasticInstanceSchedule getElasticInstanceSchedule(long elasticInstanceScheduleId)
Description copied from interface:ElasticInstanceScheduleManager
Gets the schedule associated with that id. null if none can be found for the id- Specified by:
getElasticInstanceSchedule
in interfaceElasticInstanceScheduleManager
- Returns:
-
saveElasticInstanceSchedule
public void saveElasticInstanceSchedule(ElasticInstanceSchedule schedule)
Description copied from interface:ElasticInstanceScheduleManager
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.- Specified by:
saveElasticInstanceSchedule
in interfaceElasticInstanceScheduleManager
- Parameters:
schedule
- schedule to be saved
-
removeElasticInstanceSchedule
public void removeElasticInstanceSchedule(@NotNull @NotNull ElasticInstanceSchedule schedule)
Description copied from interface:ElasticInstanceScheduleManager
Remove schedule and associated cron trigger- Specified by:
removeElasticInstanceSchedule
in interfaceElasticInstanceScheduleManager
- Parameters:
schedule
- schedule to remove
-
removeElasticInstanceSchedule
public void removeElasticInstanceSchedule(long elasticInstanceScheduleId)
Description copied from interface:ElasticInstanceScheduleManager
Remove schedule and associated cron trigger- Specified by:
removeElasticInstanceSchedule
in interfaceElasticInstanceScheduleManager
- Parameters:
elasticInstanceScheduleId
- id of schedule to remove
-
-