Interface ElasticInstanceScheduleManager
- All Known Implementing Classes:
ElasticInstanceScheduleManagerImpl
public interface ElasticInstanceScheduleManager
Manages the cron schedule for bringing up and down elastic instances
-
Method Summary
Modifier and TypeMethodDescription@Nullable ElasticInstanceSchedule
getElasticInstanceSchedule
(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.
-
Method Details
-
getElasticInstanceSchedules
Returns all schedules available in the system (enabled and disabled) TODO Sorting- Returns:
- Empty list if no schedules are found
-
getElasticInstanceSchedules
@NotNull @NotNull List<ElasticInstanceSchedule> getElasticInstanceSchedules(@NotNull @NotNull ElasticImageConfiguration elasticImageConfiguration) Returns schedules related toElasticImageConfiguration
(both enabled and disabled)- Returns:
- List of
ElasticInstanceSchedule
or empty list if nothing was found
-
getElasticInstanceSchedule
@Nullable @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
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
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
-