public class ElasticInstanceScheduleManagerImpl extends Object implements ElasticInstanceScheduleManager
Constructor and Description |
---|
ElasticInstanceScheduleManagerImpl(ElasticInstanceScheduleDao elasticInstanceScheduleDao,
ElasticInstanceScheduleScheduler elasticInstanceScheduleScheduler) |
Modifier and Type | Method and Description |
---|---|
ElasticInstanceSchedule |
getElasticInstanceSchedule(long elasticInstanceScheduleId)
Gets the schedule associated with that id.
|
List<ElasticInstanceSchedule> |
getElasticInstanceSchedules()
Returns all schedules available in the system (enabled and disabled)
TODO Sorting
|
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.
|
public ElasticInstanceScheduleManagerImpl(ElasticInstanceScheduleDao elasticInstanceScheduleDao, ElasticInstanceScheduleScheduler elasticInstanceScheduleScheduler)
@NotNull public List<ElasticInstanceSchedule> getElasticInstanceSchedules()
ElasticInstanceScheduleManager
getElasticInstanceSchedules
in interface ElasticInstanceScheduleManager
@NotNull public List<ElasticInstanceSchedule> getElasticInstanceSchedules(@NotNull ElasticImageConfiguration elasticImageConfiguration)
ElasticInstanceScheduleManager
ElasticImageConfiguration
(both enabled and disabled)getElasticInstanceSchedules
in interface ElasticInstanceScheduleManager
ElasticInstanceSchedule
or empty list if nothing was foundpublic ElasticInstanceSchedule getElasticInstanceSchedule(long elasticInstanceScheduleId)
ElasticInstanceScheduleManager
getElasticInstanceSchedule
in interface ElasticInstanceScheduleManager
public void saveElasticInstanceSchedule(ElasticInstanceSchedule schedule)
ElasticInstanceScheduleManager
saveElasticInstanceSchedule
in interface ElasticInstanceScheduleManager
schedule
- schedule to be savedpublic void removeElasticInstanceSchedule(@NotNull ElasticInstanceSchedule schedule)
ElasticInstanceScheduleManager
removeElasticInstanceSchedule
in interface ElasticInstanceScheduleManager
schedule
- schedule to removepublic void removeElasticInstanceSchedule(long elasticInstanceScheduleId)
ElasticInstanceScheduleManager
removeElasticInstanceSchedule
in interface ElasticInstanceScheduleManager
elasticInstanceScheduleId
- id of schedule to removeCopyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.