Class TimedUpdatableTaskList


  • public class TimedUpdatableTaskList
    extends java.lang.Object
    List of tasks that are to be executed at a certain time.
    Author:
    Andi Hotz, (c) Sahits GmbH, 2013 Created on Jan 28, 2013
    • Field Detail

      • LOGGER

        private static final org.slf4j.Logger LOGGER
      • log

        private final org.slf4j.Logger log
      • date

        @Autowired
        private Date date
      • timerEventBus

        @Autowired
        @Qualifier("timerEventBus")
        private com.google.common.eventbus.AsyncEventBus timerEventBus
      • tasks

        private final java.util.List<TimedTask> tasks
    • Constructor Detail

      • TimedUpdatableTaskList

        public TimedUpdatableTaskList()
    • Method Detail

      • registerWithClock

        @PostConstruct
        public void registerWithClock()
        Register as Clock update listener.
      • unregister

        @PreDestroy
        private void unregister()
      • add

        public void add​(TimedTask task)
        Add a new task.
        Parameters:
        task - to be added
      • remove

        public void remove​(TimedTask task)
        Cancel a timed task prematurely.
        Parameters:
        task - to be removed
      • handleClockTick

        public void handleClockTick​(ClockTick event)
      • getFirst

        TimedTask getFirst()
        Retrieve the first task. Only used for tests.
        Returns:
        first task in the list.