com.atlassian.bamboo.agent.elastic.schedule
Class ElasticInstanceScheduleManagerImpl

java.lang.Object
  extended by com.atlassian.bamboo.agent.elastic.schedule.ElasticInstanceScheduleManagerImpl
All Implemented Interfaces:
ElasticInstanceScheduleManager

public class ElasticInstanceScheduleManagerImpl
extends java.lang.Object
implements ElasticInstanceScheduleManager


Constructor Summary
ElasticInstanceScheduleManagerImpl(ElasticInstanceScheduleDao elasticInstanceScheduleDao, ElasticInstanceScheduleScheduler elasticInstanceScheduleScheduler)
           
 
Method Summary
 ElasticInstanceSchedule getElasticInstanceSchedule(long elasticInstanceScheduleId)
          Gets the schedule associated with that id.
 java.util.List<ElasticInstanceSchedule> getElasticInstanceSchedules()
          Returns all schedules available in the system (enabled and disabled)
 java.util.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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElasticInstanceScheduleManagerImpl

public ElasticInstanceScheduleManagerImpl(ElasticInstanceScheduleDao elasticInstanceScheduleDao,
                                          ElasticInstanceScheduleScheduler elasticInstanceScheduleScheduler)
Method Detail

getElasticInstanceSchedules

@NotNull
public java.util.List<ElasticInstanceSchedule> getElasticInstanceSchedules()
Description copied from interface: ElasticInstanceScheduleManager
Returns all schedules available in the system (enabled and disabled)

Specified by:
getElasticInstanceSchedules in interface ElasticInstanceScheduleManager
Returns:
Empty list if no schedules are found

getElasticInstanceSchedules

@NotNull
public java.util.List<ElasticInstanceSchedule> getElasticInstanceSchedules(@NotNull
                                                                                   ElasticImageConfiguration elasticImageConfiguration)
Description copied from interface: ElasticInstanceScheduleManager
Returns schedules related to ElasticImageConfiguration (both enabled and disabled)

Specified by:
getElasticInstanceSchedules in interface ElasticInstanceScheduleManager
Returns:
List of ElasticInstanceSchedule or empty list if nothing was found

getElasticInstanceSchedule

public ElasticInstanceSchedule getElasticInstanceSchedule(long elasticInstanceScheduleId)
Description copied from interface: ElasticInstanceScheduleManager
Gets the schedule associated with that id. null if none can be found for the id

Specified by:
getElasticInstanceSchedule in interface ElasticInstanceScheduleManager
Returns:

saveElasticInstanceSchedule

public void saveElasticInstanceSchedule(ElasticInstanceSchedule schedule)
Description copied from interface: ElasticInstanceScheduleManager
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.

Specified by:
saveElasticInstanceSchedule in interface ElasticInstanceScheduleManager
Parameters:
schedule - schedule to be saved

removeElasticInstanceSchedule

public void removeElasticInstanceSchedule(@NotNull
                                          ElasticInstanceSchedule schedule)
Description copied from interface: ElasticInstanceScheduleManager
Remove schedule and associated cron trigger

Specified by:
removeElasticInstanceSchedule in interface ElasticInstanceScheduleManager
Parameters:
schedule - schedule to remove

removeElasticInstanceSchedule

public void removeElasticInstanceSchedule(long elasticInstanceScheduleId)
Description copied from interface: ElasticInstanceScheduleManager
Remove schedule and associated cron trigger

Specified by:
removeElasticInstanceSchedule in interface ElasticInstanceScheduleManager
Parameters:
elasticInstanceScheduleId - id of schedule to remove


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.