Class JobSchedulerService

java.lang.Object
com.google.common.util.concurrent.AbstractExecutionThreadService
org.graylog.scheduler.JobSchedulerService
All Implemented Interfaces:
com.google.common.util.concurrent.Service, GracefulShutdownHook

@Singleton public class JobSchedulerService extends com.google.common.util.concurrent.AbstractExecutionThreadService implements GracefulShutdownHook
  • Constructor Details

  • Method Details

    • startUp

      protected void startUp() throws Exception
      Overrides:
      startUp in class com.google.common.util.concurrent.AbstractExecutionThreadService
      Throws:
      Exception
    • run

      protected void run() throws Exception
      Specified by:
      run in class com.google.common.util.concurrent.AbstractExecutionThreadService
      Throws:
      Exception
    • handleJobCompleted

      public void handleJobCompleted(JobCompletedEvent triggerCompletedEvent)
    • doGracefulShutdown

      public void doGracefulShutdown() throws Exception
      Description copied from interface: GracefulShutdownHook
      Execute shutdown tasks for the service that implements this interface.

      Warning:

      • This method is called from another thread so the class that implements GracefulShutdownHook must be thread-safe.
      • The server shutdown is waiting for this method call to complete. Blocking this method will block the server shutdown!
      Specified by:
      doGracefulShutdown in interface GracefulShutdownHook
      Throws:
      Exception
    • triggerShutdown

      protected void triggerShutdown()
      Overrides:
      triggerShutdown in class com.google.common.util.concurrent.AbstractExecutionThreadService