Interface ElasticInstanceScheduleManager

  • All Known Implementing Classes:
    ElasticInstanceScheduleManagerImpl

    public interface ElasticInstanceScheduleManager
    Manages the cron schedule for bringing up and down elastic instances
    • 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
      • 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