Interface ElasticInstanceScheduleManager
-
- All Known Implementing Classes:
ElasticInstanceScheduleManagerImpl
public interface ElasticInstanceScheduleManagerManages the cron schedule for bringing up and down elastic instances
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @Nullable ElasticInstanceSchedulegetElasticInstanceSchedule(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)voidremoveElasticInstanceSchedule(long elasticInstanceScheduleId)Remove schedule and associated cron triggervoidremoveElasticInstanceSchedule(@NotNull ElasticInstanceSchedule schedule)Remove schedule and associated cron triggervoidsaveElasticInstanceSchedule(ElasticInstanceSchedule schedule)Updates or creates the schedule.
-
-
-
Method Detail
-
getElasticInstanceSchedules
@NotNull @NotNull List<ElasticInstanceSchedule> 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
ElasticInstanceScheduleor 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
void saveElasticInstanceSchedule(ElasticInstanceSchedule schedule)
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
void removeElasticInstanceSchedule(@NotNull @NotNull ElasticInstanceSchedule schedule)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
-
-