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
ConstructorDescriptionElasticInstanceScheduleManagerImpl
(ElasticInstanceScheduleDao elasticInstanceScheduleDao, ElasticInstanceScheduleScheduler elasticInstanceScheduleScheduler) -
Method Summary
Modifier and TypeMethodDescriptiongetElasticInstanceSchedule
(long elasticInstanceScheduleId) Gets the schedule associated with that id.@NotNull List<ElasticInstanceSchedule>
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
Updates or creates the schedule.
-
Constructor Details
-
ElasticInstanceScheduleManagerImpl
public ElasticInstanceScheduleManagerImpl(ElasticInstanceScheduleDao elasticInstanceScheduleDao, ElasticInstanceScheduleScheduler elasticInstanceScheduleScheduler)
-
-
Method Details
-
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
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
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
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
-