Interface TimerManager<I>

Type Parameters:
I - the timer identifier type
All Superinterfaces:
AutoCloseable, org.wildfly.clustering.server.manager.Manager<I>, org.wildfly.clustering.server.manager.ManagerConfiguration<I>, org.wildfly.clustering.server.manager.Service

public interface TimerManager<I> extends org.wildfly.clustering.server.manager.Manager<I>, AutoCloseable
Manages creation, retrieval, and scheduling of timers.
Author:
Paul Ferraro
  • Method Details

    • createTimer

      Timer<I> createTimer(I id, IntervalTimerConfiguration config, Object context)
    • createTimer

      Timer<I> createTimer(I id, ScheduleTimerConfiguration config, Object context)
    • createTimer

      Timer<I> createTimer(I id, ScheduleTimerConfiguration config, Object context, Method method, int index)
    • getTimer

      Timer<I> getTimer(I id)
      Returns exclusive access to the timer with the specified identifier.
      Parameters:
      id - a timer identifier
      Returns:
      the timer with the specified identifier, or null if no such timer exists
    • readTimer

      default Timer<I> readTimer(I id)
      Returns non-exclusive access to the timer with the specified identifier. This should only be used to read fixed (i.e. non-dynamic) timer meta data, as this would otherwise result in a dirty read.
      Parameters:
      id - a timer identifier
      Returns:
      the timer with the specified identifier, or null if no such timer exists
    • getActiveTimers

      Stream<I> getActiveTimers()
    • close

      void close()
      Specified by:
      close in interface AutoCloseable