Interface AdminClient

All Known Implementing Classes:
AbstractAdminClient, AdminClientImpl, AdminClientPoolImpl

public interface AdminClient
An AdminClient publishes jobs to channels.
Author:
Greg Haines
  • Method Details

    • shutdownWorkers

      void shutdownWorkers(boolean now)
      Send a shutdown command on the ResqueConstants.ADMIN_CHANNEL channel.
      Parameters:
      now - if true, an effort will be made to stop any job in progress
    • shutdownWorkers

      void shutdownWorkers(String channel, boolean now)
      Send a shutdown command on the given channel.
      Parameters:
      channel - the channel to publish the pause command to
      now - if true, an effort will be made to stop any job in progress
    • togglePausedWorkers

      void togglePausedWorkers(boolean paused)
      Send a pause command on the ResqueConstants.ADMIN_CHANNEL channel.
      Parameters:
      paused - if true, the workers will not process any new jobs; if false, the workers will process new jobs
    • togglePausedWorkers

      void togglePausedWorkers(String channel, boolean paused)
      Send a pause command on the given channel.
      Parameters:
      channel - the channel to publish the pause command to
      paused - if true, the workers will not process any new jobs; if false, the workers will process new jobs
    • publish

      void publish(Job job)
      Publishes a job on the ResqueConstants.ADMIN_CHANNEL channel.
      Parameters:
      job - job the job to be published
      Throws:
      IllegalArgumentException - if the job is null
    • publish

      void publish(String channel, Job job)
      Publishes a job on the given channel.
      Parameters:
      channel - the channel to publish the job to
      job - job the job to be published
      Throws:
      IllegalArgumentException - if the channel is null or empty or if the job is null
    • end

      void end()
      Quits the connection to the Redis server.