Interface AdminClient
- All Known Implementing Classes:
AbstractAdminClient, AdminClientImpl, AdminClientPoolImpl
public interface AdminClient
An AdminClient publishes jobs to channels.
- Author:
- Greg Haines
-
Method Summary
Modifier and TypeMethodDescriptionvoidend()Quits the connection to the Redis server.voidPublishes a job on the given channel.voidPublishes a job on theResqueConstants.ADMIN_CHANNELchannel.voidshutdownWorkers(boolean now) Send a shutdown command on theResqueConstants.ADMIN_CHANNELchannel.voidshutdownWorkers(String channel, boolean now) Send a shutdown command on the given channel.voidtogglePausedWorkers(boolean paused) Send a pause command on theResqueConstants.ADMIN_CHANNELchannel.voidtogglePausedWorkers(String channel, boolean paused) Send a pause command on the given channel.
-
Method Details
-
shutdownWorkers
void shutdownWorkers(boolean now) Send a shutdown command on theResqueConstants.ADMIN_CHANNELchannel.- Parameters:
now- if true, an effort will be made to stop any job in progress
-
shutdownWorkers
Send a shutdown command on the given channel.- Parameters:
channel- the channel to publish the pause command tonow- if true, an effort will be made to stop any job in progress
-
togglePausedWorkers
void togglePausedWorkers(boolean paused) Send a pause command on theResqueConstants.ADMIN_CHANNELchannel.- Parameters:
paused- if true, the workers will not process any new jobs; if false, the workers will process new jobs
-
togglePausedWorkers
Send a pause command on the given channel.- Parameters:
channel- the channel to publish the pause command topaused- if true, the workers will not process any new jobs; if false, the workers will process new jobs
-
publish
Publishes a job on theResqueConstants.ADMIN_CHANNELchannel.- Parameters:
job- job the job to be published- Throws:
IllegalArgumentException- if the job is null
-
publish
Publishes a job on the given channel.- Parameters:
channel- the channel to publish the job tojob- 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.
-