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
ConstructorsConstructorDescriptionElasticInstanceScheduleManagerImpl(ElasticInstanceScheduleDao elasticInstanceScheduleDao, ElasticInstanceScheduleScheduler elasticInstanceScheduleScheduler) -
Method Summary
Modifier and TypeMethodDescriptiongetElasticInstanceSchedule(long elasticInstanceScheduleId) Gets the schedule associated with that id. null if none can be found for the 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)voidremoveElasticInstanceSchedule(long elasticInstanceScheduleId) Remove schedule and associated cron triggervoidremoveElasticInstanceSchedule(@NotNull ElasticInstanceSchedule schedule) Remove schedule and associated cron triggervoidUpdates or creates the schedule.
-
Constructor Details
-
ElasticInstanceScheduleManagerImpl
public ElasticInstanceScheduleManagerImpl(ElasticInstanceScheduleDao elasticInstanceScheduleDao, ElasticInstanceScheduleScheduler elasticInstanceScheduleScheduler)
-
-
Method Details
-
getElasticInstanceSchedules
Description copied from interface:ElasticInstanceScheduleManagerReturns all schedules available in the system (enabled and disabled) TODO Sorting- Specified by:
getElasticInstanceSchedulesin interfaceElasticInstanceScheduleManager- Returns:
- Empty list if no schedules are found
-
getElasticInstanceSchedules
@NotNull public @NotNull List<ElasticInstanceSchedule> getElasticInstanceSchedules(@NotNull @NotNull ElasticImageConfiguration elasticImageConfiguration) Description copied from interface:ElasticInstanceScheduleManagerReturns schedules related toElasticImageConfiguration(both enabled and disabled)- Specified by:
getElasticInstanceSchedulesin interfaceElasticInstanceScheduleManager- Returns:
- List of
ElasticInstanceScheduleor empty list if nothing was found
-
getElasticInstanceSchedule
Description copied from interface:ElasticInstanceScheduleManagerGets the schedule associated with that id. null if none can be found for the id- Specified by:
getElasticInstanceSchedulein interfaceElasticInstanceScheduleManager- Returns:
-
saveElasticInstanceSchedule
Description copied from interface:ElasticInstanceScheduleManagerUpdates 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:
saveElasticInstanceSchedulein interfaceElasticInstanceScheduleManager- Parameters:
schedule- schedule to be saved
-
removeElasticInstanceSchedule
Description copied from interface:ElasticInstanceScheduleManagerRemove schedule and associated cron trigger- Specified by:
removeElasticInstanceSchedulein interfaceElasticInstanceScheduleManager- Parameters:
schedule- schedule to remove
-
removeElasticInstanceSchedule
public void removeElasticInstanceSchedule(long elasticInstanceScheduleId) Description copied from interface:ElasticInstanceScheduleManagerRemove schedule and associated cron trigger- Specified by:
removeElasticInstanceSchedulein interfaceElasticInstanceScheduleManager- Parameters:
elasticInstanceScheduleId- id of schedule to remove
-